Documentation
¶
Overview ¶
Package uptime implements the uptime builtin command.
uptime — tell how long the system has been running
Usage: uptime [-ps] [--help]
With no options, print the current time, how long the system has been running, and the system load averages for the past 1, 5, and 15 minutes. User count is intentionally omitted (reading utmp would expose session information).
Options:
-p, --pretty show uptime in pretty format -s, --since system up since (YYYY-MM-DD HH:MM:SS) -h, --help display this help and exit
Data sources (platform-specific, bypass AllowedPaths — see AGENTS.md):
Linux: /proc/uptime, /proc/loadavg Darwin: sysctl kern.boottime, sysctl vm.loadavg Windows: GetTickCount64 (no load average available)
Exit codes:
0 Success 1 Error — platform not supported, kernel read failure, or invalid flag
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = New(sysinfo.Get)
Cmd is the uptime builtin command descriptor using the real system-info provider.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.