#!/usr/bin/perl # Script to get the requests per second and the requests currently being processed from # an Apache webserver. # In order for this to work, you will need to have server stats enabled in Apache. # To enable the builtin apache server-status, you will need to enable mod_status # and have something like the following in your httpd.conf file. # ExtendedStatus on # # SetHandler server-status # Order deny,allow # Deny from all # Allow from localhost # $output = `/bin/bash -c 'wget --quiet -O - \"http:\/\/localhost\/server-status"'`; $output =~ /(.*) requests\/sec/; print $1." "; $output =~ /(.*) requests currently being processed/; print $1;