uptime · Linux command

Also known as: uptime command

On this page 7

uptime is a Linux command that prints a one-line summary of system state: the current time, how long the system has been running since the last boot, the number of logged-in users and the load averages over 1, 5 and 15 minutes. In Linux monitoring, the uptime command is usually the first thing an administrator types on an unfamiliar or misbehaving host, because it answers two questions in a fraction of a second: has the machine rebooted recently, and is it under unusual load?

The command belongs to the procps (procps-ng) package on most distributions and reads its data from the proc filesystem, mainly /proc/uptime and /proc/loadavg. Not to be confused with uptime as a reliability metric for servers and services, which measures availability over a period rather than the time since one boot.

What the uptime output contains

The default output of uptime is a single line with four fields, for example 14:32:07 up 41 days, 3:12, 2 users, load average: 0.84, 1.10, 0.97. Each field comes from a different kernel or user-space source, and knowing that source explains the occasional surprise, such as a user count that does not match the number of SSH sessions.

The following table maps each field of the output to its meaning and its data source.

FieldExampleMeaningData source
Current time14:32:07Local wall-clock timeSystem clock
Uptimeup 41 days, 3:12Time since the kernel booted/proc/uptime
Users2 usersLogin sessions recorded in utmp/var/run/utmp or systemd-logind
Load average0.84, 1.10, 0.97Average runnable and waiting tasks/proc/loadavg
Fields in the default uptime output

The user count reflects utmp records, not processes, so terminal multiplexers, graphical sessions and services that do not register logins can make the number higher or lower than expected. On recent distributions that have replaced utmp with systemd-logind, the count comes from logind sessions instead.

How Linux calculates the load averages

The load average is an exponentially damped moving average of the number of tasks that are either running, waiting for a CPU or in uninterruptible sleep (state D). The kernel samples this count about every 5 seconds and updates three averages with decay constants that correspond to 1, 5 and 15 minutes.

Because Linux includes tasks in state D, the load average measures demand on the whole system, not on the CPU alone. A host with idle processors can still report a load of 20 or more when many threads are blocked on slow disk or network storage, such as an unresponsive NFS mount. This is the most common reason for misreading uptime output.

The three numbers are best read as a trend. The table below shows typical patterns and what they usually indicate.

PatternExampleTypical interpretation
Rising load6.20, 3.10, 1.40A burst of work has just started
Falling load0.50, 2.80, 4.90An earlier peak is subsiding
Steady load3.90, 4.00, 4.10Sustained, stable demand
Spike only9.80, 2.10, 0.90Short job, cron task or brief stall
Reading the three load averages as a trend

A load value has meaning only relative to the number of CPUs. A load of 4.0 saturates a four-core machine but leaves a 32-core server mostly idle. A rough rule of thumb is that sustained load above the logical CPU count indicates queuing, which should be confirmed with other tools before acting.

The procps-ng version of uptime supports a small set of options that change the output format, which is useful in scripts and inventory reports. The BusyBox version found on embedded systems supports fewer options.

OptionOutputTypical use
-p, --prettyup 5 weeks, 6 days, 3 hoursHuman-readable reports
-s, --since2026-10-12 11:20:03Exact boot timestamp for audits
-V, --versionPackage version stringChecking which implementation runs
-h, --helpUsage summaryQuick reference
Common uptime options in procps-ng

Scripts often read the proc files directly instead of parsing the formatted line. The first number in /proc/uptime is seconds since boot and the second is cumulative idle time of all CPUs; /proc/loadavg adds the count of runnable entities and the most recently assigned process ID after the three averages.

How uptime compares with other monitoring commands

uptime is a quick triage tool, not a diagnostic tool. It reports the same load averages shown in the header of top and htop, but it does not explain what generates the load. Experienced administrators use it to decide which tool to run next.

ToolWhat it addsWhen to use it after uptime
top / htopPer-process CPU and memory usageLoad is high and the cause is unknown
vmstatRun queue, blocked tasks, swap and I/OSeparating CPU demand from I/O waits
mpstatPer-CPU utilization and iowaitChecking whether load is evenly spread
iostatDevice latency and utilizationMany tasks appear to wait on storage
Pressure stall informationTime tasks lose to resource contentionQuantifying CPU, memory or I/O pressure
uptime and neighboring Linux monitoring tools

Pressure stall information (PSI), exposed in /proc/pressure, is a more precise modern signal because it reports the share of time tasks were stalled per resource. Load average remains valuable for its universality: it exists on every Linux system and in every historical log.

Limitations and common misreadings

The simplicity of uptime hides several traps. The list below covers the mistakes that most often lead to wrong conclusions during incident response.

  • Treating load average as CPU utilization: it counts tasks, including those blocked on I/O, not percent of CPU time.
  • Ignoring the CPU count: the same number can mean saturation or near-idle depending on the hardware.
  • Reading uptime inside a container: it normally shows the host kernel boot time and host load, unless a tool such as LXCFS virtualizes the proc files.
  • Assuming a long uptime is healthy: hundreds of days without a reboot often means kernel security updates have not taken effect.
  • Expecting instant reaction: the 1-minute average lags real changes by tens of seconds because of exponential damping.

Uptime also resets on every reboot, including kexec and live kernel replacement in some configurations, so it cannot prove long-term availability. For that, administrators rely on monitoring history and logs such as last reboot or the systemd journal.

Explained without jargon

The uptime command is like a quick glance at a dashboard in a car. In one short line, it tells you what time it is, how long the computer has been switched on without a restart, how many people are signed in and how busy the machine has been recently.

The three busy numbers describe the last minute, the last five minutes and the last fifteen minutes. Think of them as the length of a checkout line at a store: if the line is longer than the number of open registers, customers are waiting. Comparing the three numbers shows whether the line is growing or shrinking.

A typical use case

A web application on an eight-core Linux server starts responding slowly, and the on-call administrator connects over SSH. The first command, uptime, shows up 3 days and load averages of 22.4, 18.9, 11.3. The machine has not rebooted, and the rising pattern shows that the problem began in the last few minutes and is getting worse.

Because the load is almost three times the core count, the administrator runs top next and sees that CPU usage is only 15 percent while many PHP worker processes sit in state D. vmstat confirms a high number of blocked tasks, and iostat shows a network storage volume with very high latency. The storage team fails over to a healthy replica, and within fifteen minutes uptime reports load back near 2.0, matching the normal daytime level. The initial uptime reading saved time by pointing the investigation toward I/O waits rather than CPU.