Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

One of our servers has had much higher than average load today, consistently running higher than normal. Our server admins are making sure all is running okay but this has got me wondering if maybe the server is just very busy today. This in turn has made me think, is there any way to get a reasonably accurate report on how many active website visitors there are across all sites on the whole server?

All sites are PHP/MySQL running on apache 2 on Centos 4.8 - obviously we do have things like google analytics / awstats / webaliser for each site but i just wondered if theres a command that can be run that will give us an active users on server stat? maybe analyse all session files for sessions active in last x minutes?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

If you enable mod_status in apache, you can get access to a page which will give you statistics on the number of active processes, the number of idle processes, what they are processing, how many accesses per second, and volume.

http://httpd.apache.org/docs/2.0/mod/mod%5Fstatus.html

If you use a monitoring framework such as munin (http://munin.projects.linpro.no/), you can query the page over time and store the results. This will give you a graphical display over what the load looks like over time to see if any pikes correlate to the higher load on the box.

share|improve this answer
    
+1 Both mod_status and munin are great suggestions. –  EEAA Oct 24 '09 at 14:47
    
I guess I should have also mentioned that munin can monitor the health of the entire system as well (it's plugin based). You can get historical graphs for server load, memory usage, and virtually anything else. This may help further troubleshoot any times with noticably high load. –  emills Oct 24 '09 at 14:54
    
interesting that you mentioned mod_status as it reminded me we had enabled this for use with server density serverdensity.com but never set that up. It provides similar functionality to what you mention with munin. thanks –  seengee Oct 24 '09 at 15:33

Another alternative would be to use apachetop. This is an utility like top, which displays Apache information, including requests per second, bytes per second, most popular URLs, etc.

share|improve this answer

Your Answer

 
discard

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.