What is the purpose of the uptime command in Linux?
The uptime command is used to display the system’s running time and average load. It provides the following information:
- Current time: displays the current system time.
- Uptime: Displays the amount of time the system has been running since the last restart.
- Number of users: Indicates the current number of users logged into the system.
- Average load: displays the average load on the system over the past 1 minute, 5 minutes and 15 minutes.
By examining the average load, one can assess the level of busyness within the system. A high average load may indicate insufficient system resources, requiring optimization or the addition of hardware resources.