Monitoring and diagnostics

Command uptime

Show uptime and load averages

Linux · Bash examples · commands run on the selected server

When to use uptime

Use uptime to confirm server running time and view load averages as a starting point for diagnosis. Load is not the same quantity as CPU percentage, and its significance depends on capacity and workload.

Syntax

uptime [PARAMETERS]

Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.

Common options and arguments

-p
Show operating hours in a readable form.
-s
Show system boot time.

Usage examples

View uptime and load average

uptime

Running time, session accounting and recent load averages are displayed.

Show human-readable uptime

uptime -p

A more readable duration is printed.

Show the last system boot time

uptime -s

The reported boot timestamp is displayed.

Notes and limitations

  • On Linux, load average is the average number of runnable tasks and tasks in uninterruptible sleep over 1, 5 and 15 minutes.
  • Load average is not a CPU percentage. Interpret it alongside processor count and I/O state.

Common questions and troubleshooting

Does a load average of four mean four percent CPU?

No. Linux load relates to runnable and uninterruptible tasks. Compare it with CPU capacity and investigate I/O waits as well.

Can a long uptime prove the service is healthy?

No. An application can fail without a reboot. Check the relevant service state, logs and application response separately.

Further help

Options vary by version and distribution. Check the installed documentation with this command: man uptime.