Strange problem with script_server.php

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Axis
Posts: 6
Joined: Tue Sep 20, 2005 9:07 am
Location: Tilburg, the Netherlands

Strange problem with script_server.php

Post by Axis »

Weird stuff happening here.. I run a few cacti boxes with my fellow admins, and I've run into some strange problems on a new CentOS 6.3 host running cacti-0.8.8a-2.el6.noarch from the epel repo.

The problem is that (using the default scripts) cpu and disk usage polling does not work correctly. On 2cpu machines, it works on one cpu, and not the other. Disk usage queries go all weird and garble up different data sources, but I will focus on the cpu problem now. I have no idea what's wrong, another box I have running cacti-0.8.8a-1.el5.rf is doing fine.. I checked the md5 hashes for all the scripts involved, and they all look the same.

I do see something strange in the log file though. Cpu 0 works fine, and the script server gives the output '46' on line 3. On cpu 1, the output is 'PHP Script Server has Started - Parent is cmd' as shown in line 5 which is not useable.

Code: Select all

11/23/2012 11:50:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/clu-fs-01_cpu_3685.rrd --template cpu 1353711005:46
11/23/2012 11:50:05 PM - PHPSVR: Poller[0] DEBUG: PID[19358] CTR[1] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: 'clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 0'
11/23/2012 11:50:05 PM - CMDPHP: Poller[0] Host[87] DS[3685] SERVER: /usr/share/cacti/scripts/ss_host_cpu.php ss_host_cpu clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 0, output: 46
11/23/2012 11:50:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/clu-fs-01_cpu_3686.rrd --template cpu 1353711005:U
11/23/2012 11:50:05 PM - CMDPHP: Poller[0] Host[87] DS[3686] SERVER: /usr/share/cacti/scripts/ss_host_cpu.php ss_host_cpu clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 1, output: PHP Script Server has Started - Parent is cmd
11/23/2012 11:50:05 PM - PHPSVR: Poller[0] DEBUG: PID[19358] CTR[0] INC: 'ss_host_cpu.php' FUNC: 'ss_host_cpu' PARMS: 'clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 1'



If I run the script through the script server manually, that works:

Code: Select all

-bash-4.1$ php -q /usr/share/cacti/script_server.php

PHP Script Server has Started - Parent is cmd
/usr/share/cacti/scripts/ss_host_cpu.php ss_host_cpu clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 0
46
/usr/share/cacti/scripts/ss_host_cpu.php ss_host_cpu clu-fs-01.netmatch.local 87 2:161:5000:2:10:public:::::: get usage 1
46
quit
PHP Script Server Shutdown request received, exiting
-bash-4.1$ 
So to me, it looks like script_server.php is returning its banner instead of the value. And only on this machine.. Any ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Strange problem with script_server.php

Post by gandalf »

Are you able to run spine instead of cmd.php?
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests