Monitoring your Linux dedicated server can be a time-consuming activity. You have to consider stability, security, performance, and a host of other issues. Some forms of monitoring involve third-party companies. Others are as simple as typing a command from a secure shell (SSH). “Uptime” is one such command.
To begin using the uptime command, all you have to do is log into your server via SSH. Once logged in, uptime can tell you a number of facts about your server:
1. The system time. While this seems trivial, it might be more important than you realize. When you schedule maintenance and other automated tasks that might be CPU-intensive, you want to make sure that the majority of your clients/users are offline. If your server is on a different time zone than you are, you need to make sure you set your schedule accordingly.
2. System uptime. The literal output of how long the server has been up since the last reboot is the main function of uptime. If you run a hosting company and make claims about good uptime, this should be a very high number of days.
3. Number of users currently logged in. Although this will not give you a lot of security information, it can be an early warning system. If there are more users logged into via SSH than there should be, it’s time to investigate.
4. Load average. The three numbers in the load average string will tell you the amount of stress on your CPU. The first number indicates the last minute, the second the last 5 minutes, and the third the last 15 minutes. The lower the numbers, the less load there is on your server. Very high numbers should be a concern.
It is a very basic and easy command, but uptime can give you a lot of information that can lead to more investigations or satisfaction that your server is running smoothly.