Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know when the httpd server was restarted, how long it has been up etc.

Thanks Jean

share|improve this question
Which httpd server and on what operating system? – squillman Mar 19 '11 at 18:29
service httpd restart|stop|reload on linux – Jean Mar 19 '11 at 18:30
Look in your error logs. – Lekensteyn Mar 19 '11 at 18:59
is there direct command line, which is what I am looking for – Jean Mar 19 '11 at 19:01

Apache on *nix? Then you probably want to take a look at the mod_status module:

If you want to access that information from commandline, you can use apache2ctl:

srv107:/home/fab# /usr/sbin/apache2ctl fullstatus

                      Apache Server Status for localhost

Server Version: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1
       mod_python/3.2.10 Python/2.4.4 PHP/5.2.6-3 with Suhosin-Patch
       mod_ssl/2.2.9 OpenSSL/0.9.8g

Server Built: Oct 1 2008 09:59:40

Current Time: Sunday, 20-Mar-2011 10:57:23 CET
Restart Time: Monday, 14-Mar-2011 19:28:12 CET
Parent Server Generation: 8
Server uptime: 5 days 15 hours 29 minutes 10 seconds
Total accesses: 1535825 - Total Traffic: 12.5 GB
CPU Usage: u67.72 s11.32 cu.01 cs0 - .0162% CPU load
3.15 requests/sec - 26.8 kB/second - 8.5 kB/request
20 requests currently being processed, 8 idle workers

mod_status must be enabled for that to work

share|improve this answer

The best way to do this is to properly use something like mod_status for the best accuracy.

I'm assuming this is a RHEL based distribution using Apache (httpd daemon).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.