httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foster, Stephen \(ASPIRE\)" <steve.fos...@hmrcaspire.com>
Subject RE: [users@httpd] Information in mod_status to text file
Date Mon, 08 Jun 2009 13:29:41 GMT
For example, the standard script comes with the following:

 

 

while (<S>) {

$requests=$1 if ( m|^BusyWorkers:\ (\S+)|);

$idle=$1 if ( m|^IdleWorkers:\ (\S+)|);

$number=$1 if ( m|Total Accesses:\ (\S+)|);

$cpu=$1 if (m|^CPULoad:\ (\S+)|);

        }

        print OUT "$time,$requests,$idle,$number,$cpu\n";

 

 

I modified this to get the following data:

 

while (<S>) {

                $accesses=$1 if ( m|^Total Accesses:\ (\S+)|);

                $kbytes=$1 if ( m|^Total kBytes:\ (\S+)|);

                $cpuload=$1 if ( m|^CPULoad:\ (\S+)|);

                $uptime=$1 if ( m|Uptime:\ (\S+)|);

                $reqpersec=$1 if (m|^ReqPerSec:\ (\S+)|);

                $bytespersec=$1 if (m|^BytesPerSec:\ (\S+)|);

                $bytesperreq=$1 if (m|^BytesPerReq:\ (\S+)|);

                $busyworkers=$1 if (m|^BusyWorkers:\ (\S+)|);

                $idleworkers=$1 if (m|^IdleWorkers:\ (\S+)|);

        }

        print OUT
"$time,$accesses,$kbytes,$cpuload,$uptime,$reqpersec,$bytespersec,$bytes
perreq,$busyworkers,$idleworkers\n";

 

So its very useful for seeing if you run out of resources and what your
throughput is looking like.

 

HTH

 

Steve

________________________________

From: Foster, Stephen (ASPIRE) 
Sent: 08 June 2009 14:22
To: users@httpd.apache.org
Subject: RE: [users@httpd] Information in mod_status to text file

 

Why not have a look at "log_server_status" , google it..

 

It's a useful perl script that can be used to connect to the server and
output the metrics into a logfile for then graphing against.

 

It comes with a very basic set of reports but its quite easy to modify
to collect further fields of information to see what the statistical
behaviour of the webserver is.

 

HTH

 

Steve

 

Capgemini is a trading name used by the Capgemini Group of companies
which includes Capgemini UK plc, a company registered in England and
Wales (number 943935) whose registered office is at No. 1 Forge End,
Woking, Surrey, GU21 6DB.

This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message.


Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini
UK plc, a company registered in England and Wales (number 943935) whose registered office
is at No. 1 Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is the property
of the Capgemini Group. It is intended only for the person to whom it is addressed. If you
are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this message in error,
please notify the sender immediately and delete all copies of this message.

Mime
View raw message