Checking the uptime of my VPS
It can be hard to determine the exact uptime of your service, as there's so many kinds of downtime that you may need to check, sometimes your site can be down for only certain people due to a DNS error, or maybe your site is down for only 1 person due to a firewall block.
It can be impossible to stay on top of all of these situations, however on a Linux
system it's simple to see whether or not your server, and the services running on it are active, simply run one of the following commands once logged in via SSH:
This command will show you how long it's been since the server was last rebooted, this information can be useful for seeing how long the server has been switched on.
- service httpd status
This command will show you the current status of the Apache web server, among other information, this shows how long the server has been running next to 'Server Uptime:'.
On a Windows
system, similar information can be found by running the following command via CMD:
- net stats srv
This will show you how long it's been since the server was last rebooted.
The use of Third Party Monitoring
tools can be very useful for checking the uptime of a service as well, however the results of these can be interfered with by factors out of your control.
Using a combination of these techniques for checking uptime is the best way to get accurate results.