pcp
[Top] [All Lists]

Workarounds for apache 2

To: pcp@xxxxxxxxxxx
Subject: Workarounds for apache 2
From: tfb@xxxxxxxx
Date: Mon, 15 Dec 2003 17:12:13 +0000
Sender: pcp-bounce@xxxxxxxxxxx
User-agent: Demon-WebMail/2.0
I've been looking at pcp 2.3.2-4, and playing with the apache monitoring 
module. Unfortunately the apache 2 status page has changed the name of some of 
the fields - not a very smart decision! - causing it to fail to get the 
information, and complain away in its log file.

The following patch works around this by looking for either old or new field 
name.  I hope it hasn't been mangled too badly - I'm sending it from a horrible 
web mail thingy...

--tim

--cut--
*** src/pmdas/apache/apache.c~  2003-10-06 07:56:42.000000000 +0100
--- src/pmdas/apache/apache.c   2003-12-15 14:22:03.000000000 +0000
***************
*** 240,249 ****
                else if (strcmp(s2,"BytesPerReq:") == 0) {
                        data.bytes_per_request = atoi(s3);
                }
!               else if (strcmp(s2,"BusyServers:") == 0) {
                        data.busy_servers = atoi(s3);
                }
!               else if (strcmp(s2,"IdleServers:") == 0) {
                        data.idle_servers = atoi(s3);
                }
                else if (strcmp(s2,"Scoreboard:") == 0) {
--- 240,253 ----
                else if (strcmp(s2,"BytesPerReq:") == 0) {
                        data.bytes_per_request = atoi(s3);
                }
!               else if ((strcmp(s2,"BusyServers:") == 0) ||
!                        (strcmp(s2,"BusyWorkers:") == 0))
!               {
                        data.busy_servers = atoi(s3);
                }
!               else if ((strcmp(s2,"IdleServers:") == 0) ||
!                        (strcmp(s2,"IdleWorkers:") == 0))
!               {
                        data.idle_servers = atoi(s3);
                }
                else if (strcmp(s2,"Scoreboard:") == 0) {



<Prev in Thread] Current Thread [Next in Thread>