cmdphp Partial Result, images blank and values nan

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

Moderators: Developers, Moderators

Post Reply
duncanrshannon
Posts: 5
Joined: Fri Dec 02, 2005 12:47 pm

cmdphp Partial Result, images blank and values nan

Post by duncanrshannon »

Hi all-

I have cacti up and runnin on SLES9, wiht all the components installed by source:

apache: 2.0.55
mysql-max: 4.0.26
php: 4.4.1
rrdtool:1.0.50
net-snmp:5.1
cacti:0.8.6g

I created some graphs (localhost and others) and they are seen as "UP". When i view the graphs, they are blank. THe current, average and max values are all "nan"

The data seems to be generated:

Code: Select all

ntux01:/opt/apache/htdocs/cacti/rra # ls -la
total 1098
drwxr-xr-x   2 cactiuser users    912 Dec  2 11:25 .
drwxr-xr-x  11 dshannon  users   1608 Sep  8 18:56 ..
-rw-r--r--   1 cactiuser users      0 Sep  8 18:56 .placeholder
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_5min_cpu_21.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_cpu_nice_12.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_cpu_system_13.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_cpu_user_14.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_load_15min_16.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_load_1min_15.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_load_5min_17.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_mem_buffers_18.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_mem_cache_19.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 iowa_router_mem_free_20.rrd
-rw-r--r--   1 cactiuser cacti 141632 Dec  2 11:05 localhost_load_1min_5.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:50 localhost_mem_buffers_3.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:50 localhost_mem_swap_4.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:50 localhost_proc_7.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:50 localhost_users_6.rrd
-rw-r--r--   1 cactiuser cacti 141632 Dec  2 11:20 ntux_load_1min_8.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 ntux_ping_10.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 ntux_proc_11.rrd
-rw-r--r--   1 cactiuser cacti  47984 Dec  2 11:30 ntux_users_9.rrd
Here is one cycle of debug output for the "localhost"

Code: Select all

 12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Time: 0.0852 s, Theads: N/A, Hosts: 1
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /opt/apache/htdocs/cacti/scripts/unix_processes.pl, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /opt/apache/htdocs/cacti/scripts/unix_users.pl, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /opt/apache/htdocs/cacti/scripts/loadavg_multi.pl, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /opt/apache/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /opt/apache/htdocs/cacti/scripts/linux_memory.pl MemFree:, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] SNMP: Host responded to SNMP
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: FILENM: /opt/apache/htdocs/cacti/script_server.php
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: DIRNAM: /opt/apache/htdocs/cacti
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: GETCWD: /var/spool/cron
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
12/02/2005 11:45:01 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/cmd.php 0 1]
12/02/2005 11:40:02 AM - SYSTEM STATS: Time:1.0131 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
12/02/2005 11:40:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
It was not graphing the data for other devices (but images were there.. as in not broken images) such as a cisco router, a windows server, and another linux box.

Here is the output from cactid.log from the same timeframe:

Code: Select all

12/02/2005 11:45:01 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/cmd.php 0 1]
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: GETCWD: /var/spool/cron
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: DIRNAM: /opt/apache/htdocs/cacti
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: FILENM: /opt/apache/htdocs/cacti/script_server.php
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] SNMP: Host responded to SNMP
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid.  Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /opt/apache/htdocs/cacti/scripts/linux_memory.pl MemFree:, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid.  Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /opt/apache/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid.  Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /opt/apache/htdocs/cacti/scripts/loadavg_multi.pl, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid.  Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /opt/apache/htdocs/cacti/scripts/unix_users.pl, output: U
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid.  Partial Result:
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /opt/apache/htdocs/cacti/scripts/unix_processes.pl, output: U
12/02/2005 11:45:01 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
12/02/2005 11:45:01 AM - CMDPHP: Poller[0] Time: 0.0852 s, Theads: N/A, Hosts: 1
12/02/2005 11:45:02 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1133545501:U
12/02/2005 11:45:02 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1133545501:U
12/02/2005 11:45:02 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_load_1min_5.rrd --template  1133545501:U
12/02/2005 11:45:02 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_users_6.rrd --template users 1133545501:U
12/02/2005 11:45:02 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_proc_7.rrd --template proc 1133545501:U
12/02/2005 11:45:02 AM - SYSTEM STATS: Time:1.0182 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
12/02/2005 11:45:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/poller_commands.php]
12/02/2005 11:45:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/poller_export.php]
WHen i snmpwalk (with -v 1 or -v 2c) to localhost, I get what appears to be normal data:

Code: Select all

ntux01:/var/log # snmpwalk -v 2c -c  public localhost .1.3.6.1.2.1.2.2.1.1

IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
when I snmpwalk to a remote (linux) host (redhat 9), -v 2c seems to error, and -v 1 retunrs nothing.

Code: Select all

ntux01:/var/log # snmpwalk -v 2c -c  public ntux .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex = No Such Object available on this agent at this OID
ntux01:/var/log # snmpwalk -v 1 -c  public ntux .1.3.6.1.2.1.2.2.1.1

I did see the post about selinux.. I am running SLES9 ( Suse Enterprise 9) which has a couple selinux pkgs installed, but i never configured them and the files referenced in the selinux post dont exist. Ill remove them and see if that helps.


Of course everything else went very smoothly...

thanks much in advance.

duncan


update- i ran poller.php as cactiuser and got this output:

Code: Select all

cactiuser@ntux01:/opt/apache/htdocs/cacti> /opt/php/bin/php poller.php
12/02/2005 02:13:58 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/cmd.php 0 1]
Waiting on 1/1 pollers.
Can't open perl script "/opt/apache/htdocs/cacti/scripts/linux_memory.pl": Permission denied
Can't open perl script "/opt/apache/htdocs/cacti/scripts/linux_memory.pl": Permission denied
Can't open perl script "/opt/apache/htdocs/cacti/scripts/loadavg_multi.pl": Permission denied
Can't open perl script "/opt/apache/htdocs/cacti/scripts/unix_users.pl": Permission denied
Can't open perl script "/opt/apache/htdocs/cacti/scripts/unix_processes.pl": Permission denied
12/02/2005 02:13:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1133554438:U
OK u:0.00 s:0.00 r:0.97
12/02/2005 02:13:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1133554438:U
OK u:0.00 s:0.00 r:0.97
12/02/2005 02:13:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_load_1min_5.rrd --template  1133554438:U
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:0.97
12/02/2005 02:13:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_users_6.rrd --template users 1133554438:U
OK u:0.00 s:0.00 r:0.97
12/02/2005 02:13:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/apache/htdocs/cacti/rra/localhost_proc_7.rrd --template proc 1133554438:U
OK u:0.00 s:0.00 r:0.97
12/02/2005 02:13:59 PM - SYSTEM STATS: Time:1.0158 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
12/02/2005 02:13:59 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/poller_commands.php]
12/02/2005 02:13:59 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/php/bin/php, ARGS: -q /opt/apache/htdocs/cacti/poller_export.php]

I followed the install (http://www.cacti.net/downloads/docs/con ... How-To.pdf)... but yet im getting permission errors? what should the perms be?

I see they are now: (and they look suspect!)

cactiuser@ntux01:/opt/apache/htdocs/cacti> ls -lah /opt/apache/htdocs/cacti/scripts/linux_memory.pl
-rw------- 1 dshannon users 119 2005-09-08 18:56 /opt/apache/htdocs/cacti/scripts/linux_memory.pl

Is it just a missing step in that guide? .... me searches around for a bit.
duncanrshannon
Posts: 5
Joined: Fri Dec 02, 2005 12:47 pm

resolved: basically resolved

Post by duncanrshannon »

i chmod'd 666 all the scripts and now the graphs are pretty.

shrug.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The poller runs from crontab, so it is wise to
1) supply all executables with full path info
2) make all of them at least readable for the crontab user executing them
Reinhard
duncanrshannon
Posts: 5
Joined: Fri Dec 02, 2005 12:47 pm

Post by duncanrshannon »

1) the full path was there.
2) the chmod 666 on the scripts got it working, and is all im going to do on it for now.

thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests