User Tools

Site Tools


apache:monitoring

Apache Monitoring

using system tools

count accesses to sites

Count total in access log

wc -l /var/log/httpd/big-site.com-access_log

Total open connections to the web server:

netstat -n | grep "193.218.102.161:80" | wc -l

watching Apache processes

  • top or htop
  • apachetop
  • ps

Measure Memory consumption

ps -ylC httpd --sort:rss

mod status

Apache mod_status provides Apache runtime information.

Configure

See mod_status for details.

Apache configurations:

ExtendedStatus On
 
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    # Allow access from localhost and from backend
    Allow from 127.0.0.1 192.168.63.254
</Location>

usage from command line

service httpd fullstatus

usage over http

  • Access status information over your web browser:
    • http:<apache default-host>/server-status * Machine readable format: * http:<apache default-host>/server-status?auto
  • Auto refresh (N in seconds)
    • http:<apache default-host>/server-status?refresh=N * Example, machine readable, update every 5 seconds: * http:<apache default-host>/server-status?auto&refresh=5

Monitoring Apache processes with Monit

Take a look here for Monit a highly configurable watchdog: monit

/srv/wiki.niwos.com/data/pages/apache/monitoring.txt · Last modified: 2010/10/07 13:46 (external edit)