Home·Terminal commands

uptime

Processes and system

Usage

uptime

Shows how long the machine has been up plus the load average; those three numbers are runnable processes averaged over 1, 5 and 15 minutes, not percentages, so 4.00 on a 4-core box means fully busy.

Common flags

FlagMeaning
-pPrint it as a sentence, "up 3 weeks, 2 days" (Linux).
-sPrint the moment the machine booted (Linux).
load averageRunnable processes averaged over 1, 5 and 15 minutes. Not a percentage.

Examples

uptime

How long the machine has been up, who is logged in, and the load.

uptime -p

Just the readable duration (Linux).

What is running and what is eating the machine. Identifying it comes before killing it.

How to read this

  • Square brackets [ ] mark a part you may leave out.
  • An ellipsis … means you can list more than one.
  • Flags are case-sensitive — in some commands -r and -R do different things.

Questions

Q. What does uptime do?

Shows how long the machine has been up plus the load average; those three numbers are runnable processes averaged over 1, 5 and 15 minutes, not percentages, so 4.00 on a 4-core box means fully busy.

Q. How do I type it?

uptime — square brackets mark the parts you can leave out.

Q. How many flags are worth knowing?

3 are listed here; the full set is in man uptime. This command sits under Processes and system.

Related commands

man page: man uptime