Today I have received the notification from website monitoring service provider that my site was down more than 2 hours. Apache has built in utilities that screen Apache usage and performance. The Apache Status is one such tool that takes into consideration constant observing of Apache connection and resource usage.
So in this article we will show you how to check Apache web server Up time.
Accessing the Apache status is very easy, you just need to SSH into the server. Just type the following command to check the apache web server uptime.
Check apache web server uptime in Linux
Httpd status
See the output:
httpd status Apache Server Status for localhost Server Version: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server Built: Dec 18 2015 16:32:08 __________________________________________________________________ Current Time: Tuesday, 19-Jan-2016 00:57:48 EST Restart Time: Monday, 18-Jan-2016 14:05:53 EST Parent Server Generation: 10 Server uptime: 10 hours 51 minutes 55 seconds Total accesses: 1729433 - Total Traffic: 6.9 GB CPU Usage: u108.38 s133.62 cu2721.19 cs0 - 7.58% CPU load 44.2 requests/sec - 185.5 kB/second - 4296 B/request 6 requests currently being processed, 8 idle workers W_WW_.W_W___W_.........._....................................... ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process
The first part gives you an information about Apache status and when service was last restarted. The second half of the status gives you a view of what all the Apache workers are doing at a moment. This information will help you to troubleshoot the Apache when it’s having an issue.
Using the Apache fullstatus
We can use the fullstatus command to check the Apache web server up time.It will gives the full information regarding the actual requests that hit the server. To get the full status run the following command:
httpd fullstatus | grep uptime
The fullstats gives the information about currently who is accessing what on your server.This will help you to find out if one of your website or pages getting more traffic than others. Here Client, Vhost and Requests are the mostly used columns.
Client: Is the IP of the person accessing the resource
Vhost: is the domain or subdomain being accessing.
Request: is the actual file on the site which is being accessed.
Check apache web server uptime in cpanel/WHM server
To check the Apache web server uptime in cPanel/WHM server, Follow the steps below:
Go to:
WHM >> Server Status >> Apache Status
Apache server status for server1 Server Version: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server Built: Dec 18 2015 16:32:08 Current Time: Tuesday, 19-Jan-2016 01:23:00 EST Restart Time: Monday, 18-Jan-2016 14:05:53 EST Parent Server Generation: 10 Server uptime: 11 hours 17 minutes 7 seconds Total accesses: 1749418 - Total Traffic: 7.2 GB CPU Usage: u91.61 s115.97 cu2418.35 cs0 - 6.46% CPU load 43.1 requests/sec - 185.3 kB/second - 4405 B/request 5 requests currently being processed, 11 idle workers
The Apache status and fullstatus command provide an overwhelming amount of information that can further help you to diagnose Apache problems and make a good decision.