ping.pl Result from CMD not valid. Partial Result: U

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
nadidlo
Posts: 2
Joined: Sat May 21, 2011 1:27 pm

ping.pl Result from CMD not valid. Partial Result: U

Post by nadidlo »

Hello,

i have problem with Ping Latency graph. According to the log it looks like a problem in getting data with script ping.pl
Another graphs at localhost as Loadaverage etc. are ok.
Can you tell me what am I doing wrong?

Cacti Version: 0.8.7g
SNMP Version: NET-SNMP version: 5.4.3
RRDTool: 1.4.3 (in cacti general config i set 1.4.x)

PHP Version: 5.3.3-7+squeeze1 (Linux)
Kernel: 2.6.18.8-snail-helix-xeon-xenUx86_64
PHP SNMP Installed
max_execution_time 30
memory_limit 256M

Maybe problem with mhash? In php5.3. isn't mhash.so...
poller-error.log

Code: Select all

PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mhash.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mhash.ini on line 1 in Unknown on line 0
cacti.log

Code: Select all

[size=85]05/22/2011 02:00:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
05/22/2011 02:00:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q "/usr/share/cacti/site/cmd.php" 0 2]
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] PING: UDP Ping Success (0.09 ms)
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /usr/share/cacti/site/scripts/linux_memory.pl MemFree:, output: 119176
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /usr/share/cacti/site/scripts/linux_memory.pl SwapFree:, output: 1048568
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /usr/share/cacti/site/scripts/loadavg_multi.pl, output: 1min:0.11 5min:0.07 10min:0.01
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /usr/share/cacti/site/scripts/unix_users.pl , output: 0
05/22/2011 02:00:02 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /usr/share/cacti/site/scripts/unix_processes.pl, output: 92
05/22/2011 02:00:02 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.11' [map 1min->load_1min]
05/22/2011 02:00:02 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.07' [map 5min->load_5min]
05/22/2011 02:00:02 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.01' [map 10min->load_15min]
05/22/2011 02:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_proc_7.rrd --template proc 1306065602:92
05/22/2011 02:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_users_6.rrd --template users 1306065602:0
05/22/2011 02:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1306065602:0.11:0.07:0.01
05/22/2011 02:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1306065602:1048568
05/22/2011 02:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1306065602:119176
05/22/2011 02:00:03 PM - CMDPHP: Poller[0] Host[2] PING: TCP Ping Success (0.18 ms)
05/22/2011 02:00:07 PM - CMDPHP: Poller[0] Host[2] DS[8] WARNING: Result from CMD not valid.  Partial Result: U
05/22/2011 02:00:07 PM - CMDPHP: Poller[0] Host[2] DS[8] CMD: perl /usr/share/cacti/site/scripts/ping.pl problbecky.cz, output: U
05/22/2011 02:00:07 PM - CMDPHP: Poller[0] Time: 5.3702 s, Theads: N/A, Hosts: 2
05/22/2011 02:00:07 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/problbecky_cz_ping_8.rrd --template ping 1306065602:U
05/22/2011 02:00:07 PM - SYSTEM STATS: Time:6.2558 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:6 RRDsProcessed:6
05/22/2011 02:01:12 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title='problbecky.cz - Ping Latency'  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label='milliseconds'  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:10:  --font UNIT:8:  DEF:a="/var/lib/cacti/rra/problbecky_cz_ping_8.rrd":ping:AVERAGE  AREA:a#FFF200FF:""   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
05/22/2011 02:01:12 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title='problbecky.cz - Ping Latency'  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label='milliseconds'  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:10:  --font UNIT:8:  DEF:a="/var/lib/cacti/rra/problbecky_cz_ping_8.rrd":ping:AVERAGE  AREA:a#FFF200FF:""   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
05/22/2011 02:01:12 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title='problbecky.cz - Ping Latency'  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label='milliseconds'  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:10:  --font UNIT:8:  DEF:a="/var/lib/cacti/rra/problbecky_cz_ping_8.rrd":ping:AVERAGE  AREA:a#FFF200FF:""   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
05/22/2011 02:01:14 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title='problbecky.cz - Ping Latency'  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label='milliseconds'  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:10:  --font UNIT:8:  DEF:a="/var/lib/cacti/rra/problbecky_cz_ping_8.rrd":ping:AVERAGE  AREA:a#FFF200FF:""   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"[/size]
Thank you for your help.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: ping.pl Result from CMD not valid. Partial Result: U

Post by gandalf »

The mhash issue is related to a setting in /etc/php.ini.
YOu must use ";" as a comment char instead of "#". That's all.

The second issue may be related to a known and fixed bug. See official patches at http://www.cacti.net
R.
nadidlo
Posts: 2
Joined: Sat May 21, 2011 1:27 pm

Re: ping.pl Result from CMD not valid. Partial Result: U

Post by nadidlo »

Oh, sry about comment char :-) poller-error.log is clear now.

After patch, cacti.log is not change. I've searched in the syslog and i found:

Code: Select all

May 22 05:40:01 vsnadidlo /USR/SBIN/CRON[11778]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
May 22 05:40:01 vsnadidlo /USR/SBIN/CRON[11781]: (root) CMD (/usr/local/sbin/apache.reload > /dev/null 2>&1)
May 22 05:40:02 vsnadidlo suhosin[11785]: ALERT - script tried to disable memory_limit by setting it to a negative value -1 bytes which is not allowed attacker 'REMOTE_ADDR not set', file 'unknown')
Maybe memory_limit 256MB is too little for cacti. Is this possible?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: ping.pl Result from CMD not valid. Partial Result: U

Post by gandalf »

Please change

Code: Select all

php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
to

Code: Select all

php -q /usr/share/cacti/site/poller.php >/var/log/cacti/poller-error.log 2>&1
The suhosin error does not ring a bell. It might happen, that somewhere in the code (plugins preferred), memory limit is set. And in case suhosin does not like this, bingo
R.
daftu
Posts: 1
Joined: Mon Mar 12, 2012 8:09 am

Re: ping.pl Result from CMD not valid. Partial Result: U

Post by daftu »

The problem is because of obsolete format of "ping" command output in "ping.pl" script.
Is:

Code: Select all

open(PROCESS, "ping -c 1 $host | grep icmp_seq | grep time |");
Should be:

Code: Select all

open(PROCESS, "ping -c 1 $host | grep icmp_req | grep time |");
(change icmp_seq to icmp_req)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: ping.pl Result from CMD not valid. Partial Result: U

Post by gandalf »

The correct patch to that is available with 087i, I suppose. At least, it's available at http://svn.cacti.net. Best to download complete scripts/ping.pl
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest