LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2012, 08:02 AM   #1
nikeshp
Member
 
Registered: Jan 2010
Location: Cochin
Posts: 35

Rep: Reputation: 0
How to see the Uptime of Apache httpd server


I want to find the uptime of Apache httpd server
 
Old 02-24-2012, 08:13 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
There are various ways to get the uptime.
1.) Print the process list (ps), then grep for the name of the webserver, then grep for the root user cause this one holds the initial programm the rest are childs per request (depending on MPM)
Code:
ps aux | grep httpd | grep root
2.) Print the first line of the access log and extract the time. This holds only true if you use the apache logging itself. Else you have to find the log file that contains the startup message
 
Old 02-24-2012, 08:15 AM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Maybe you can check the time and date of /var/run/apache2.pid

Or maybe you can just run 'apachectl status', but I am not sure.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single wildcard certificate for apache httpd server and tomcat udaykiran Linux - Server 3 02-19-2010 09:50 AM
apache server and httpd ust Linux - Software 2 02-12-2009 03:03 PM
Apache HTTPD server not connecting through internet. Moriya Linux - Newbie 5 04-09-2008 08:45 AM
configuration of httpd.conf to run apache server adityabhat2 Linux - Newbie 2 02-13-2005 12:10 PM
tomcat 5 implimentation on apache httpd server srikz Red Hat 0 07-22-2004 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration