It is often quite useful to know just exactly how long your Ubuntu server has been up and running since its last shutdown or reboot. As it turns out, grabbing this data is pretty trivial: just make use of the uptime command!
From the manual: uptime gives a one line display of the following information:
- The current time
- how long the system has been running
- how many users are currently logged on
- and the system load averages for the past 1, 5, and 15 minutes
(Note that that this is the same information contained in the header line displayed by the command w)
A further note: System load averages is the average number of processes that are either in a runnable or uninterruptable state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in uninterruptable state is waiting for some I/O access, eg waiting for disk. The averages are taken over the three time intervals. Load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.
Useful to know.
Related Link: Ubuntu Manuals 14.04 LTS