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:
- uptime
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:'.
- net stats srv
This will show you how long it's been since the server was last rebooted.
Using a combination of these techniques for checking uptime is the best way to get accurate results.