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 [users@httpd] Odd log_server_status behaviour in Linux Vs. Solaris
Date Tue, 17 Jun 2008 16:26:09 GMT
Hi there,

 

I've been using log_server_status to monitor the behaviour of my apache
servers and am getting some odd behaviour between Linux and solaris. On
solaris if I set the $server variable to a non-existent name , such as
www.foo.com <http://www.foo.com/> , then the script fails to connect to
the running webserver, which is exactly what I expect. In the linux
implementation (built under SLES10SP2) if I leave the $server variable
set to localhost it also fails as I expect as I don't have a webserver
running on 127.0.0.1. However if I set the variable to anything other
than localhost, e.g "notlocalhost" or any other name other than that of
my listening server then the script connects and reports back properly.
Has anyone come across this before???? Obviously it makes my life easy
as on the linux servers I can deliver a generic script with
"notlocalhost" configured as the server name and I know it will connect
and report back okay. It just doesn't work as you would expect. Ie. A
duff name should result in a no-connection.

 

Also the standard delivered log_server_status script is faulty for the
following reason:

 

The request variable comes configured as "$request = "/status/?auto";" ,
whereas it should be "$request = "/server-status/?auto";"

 

Also the script is limited on what it will report so it would be better
to modify the script output to report more of what "/server-status?auto"
gives you. I have made the following changes to report more and to
format the outputted file better to allow graphing within the likes of
excel.

 

Date Format:

Change:

       $date = $year . `date +%m%d:%H%M%S`;

To:

        $date = $year . `date +%m%d:%H.%M.%S`;

 

Change:

       while (<S>) {

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

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

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

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

       }

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

 

To:

         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";

 

Hope this helps someone out, but would there be any mileage in getting
the delivered script to suit the above format and also to apply the fix
to the request variable.

 

Cheers

 

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.

Mime
View raw message