cmd.php works - cactid fails: Result from SCRIPT not valid

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

Moderators: Developers, Moderators

tsanche37

cmd.php works - cactid fails: Result from SCRIPT not valid

Post by tsanche37 »

This is in relation to a perl script that I downloaded from this site for checking Netscreen stats. It's called netscreen_stats.pl (naturally) and runs fine from the command line as either an executable or using the "perl netscreen_stats.pl" command. I saw another thread where someone was having the same problem (runs in cmd.php, but not in cactid) during the beta, but according the thread, it was fixed during pre-release.

The relevant portions of the Cacti Log are:


09/17/2004 05:04:59 PM - CACTID: Poller[0] Host[2] SNMP Result: Host responded to SNMP
09/17/2004 05:04:59 PM - CACTID: Poller[0] DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='',min_time='3.204110',max_time='77.080000',cur_time='3.309010',avg_time='8.573499',total_polls='17',failed_polls='0',availability='100.0000' where id='2'

09/17/2004 05:04:59 PM - CACTID: Poller[0] Host[2] RECACHE: Processing 1 items in the auto reindex cache for '111.111.111.111'
09/17/2004 05:04:59 PM - CACTID: Poller[0] Host[2] DEBUG: The POPEN returned the following File Descriptor 9
09/17/2004 05:04:59 PM - CACTID: Poller[0] Host[2] WARNING: Result from SCRIPT not valid. Partial Result: cpu1:1 cpu5:1 cöselect data_query_id,action,op,assert_value,arg1 from poller_reindex where host_id=2...
09/17/2004 05:04:59 PM - CACTID: Poller[0] Host[2] SCRIPT: /usr/local/bin/netscreen_stats.pl 111.111.111.111 PUBLIC, output: U
09/17/2004 05:04:59 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (10,'',NOW(),'U')

So you can see by the first line that SNMP is working fine - The problem is the script open doesn't work properly.

I tried moving the script to the same directory as cactid (/usr/local/bin) but to no avail.

It works fine with cmd.php, but I wish to use cactid for the speed advantage.
Guest

Post by Guest »

Forgot to add - This is a new install of 0.8.6 on Fedora, PHP version 4.3.6, PERL version 5.8.3
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Is the file set to 777? (aka chmod 777 myfile). Also, are you running the pre-release of 0.8.6a?

Thanks in Advance,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Guest

Post by Guest »

I just chmod'ed it (you did mean the script, right?) to 777, but to no avail. And I've even tried chowning it to root, the cacti user and the webserver user...no joy.

This the the 0.8.6 release that I downloaded from the "http://www.cacti.net/download_cacti.php" page yesterday.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Could you please show the output from cmd.php. I believe it will look like the following "cpu1:1 cpu5:1"

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Guest

Post by Guest »

You are correct:

09/19/2004 10:35:25 AM - CMDPHP: Poller[0] Host[2] CMD: /usr/local/bin/netscreen_stats.pl 111.111.111.111 PUBLIC, output:cpu1:1 cpu5:1 cpu15:1 memory_allocated:20278304 memoryAvailable:94016480 memoryFragmented:6922 sessionsAllocated:4 sessionsMaximum:8000 sessionsFailed:0

It gets the memory right. It gets the sessions right...What's up with the cpu? And why is that making the whole thing crash?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

tsanche37,

What is your OS version? You may have to work directly with me on this one. This would appear to be a compiler/os specific issue.

Also, did you download the RPM or build it from source? If you downloaded the rpm, have your tried following the README in the source distribution?

Please state the following:

net-snmp version:
OS version:
PHP version:
MySQL version:
gcc version:

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Guest

Post by Guest »

It's going to be a couple of days before I have answers - That box is at work and I'm at home.

I'll e-mail a friend there and ask him to log into it and check - That may get me the answers sooner
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

I have the same problem. See my log :
09/21/2004 08:20:44 PM - SYSTEM STATS: Time: 43.3790 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:25:42 PM - SYSTEM STATS: Time: 41.4084 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:30:38 PM - SYSTEM STATS: Time: 38.2310 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:35:38 PM - SYSTEM STATS: Time: 38.2335 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:40:38 PM - SYSTEM STATS: Time: 38.3060 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:45:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:04 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:04 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:04 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/21/2004 08:45:16 PM - SYSTEM STATS: Time: 15.3856 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/21/2004 08:50:40 PM - SYSTEM STATS: Time: 40.4328 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 08:55:38 PM - SYSTEM STATS: Time: 38.0090 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 09:00:39 PM - SYSTEM STATS: Time: 38.5169 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 09:05:36 PM - SYSTEM STATS: Time: 36.0317 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 09:10:38 PM - SYSTEM STATS: Time: 38.1231 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3
09/21/2004 09:15:40 PM - SYSTEM STATS: Time: 39.9403 s, Method: cmd.php, Processes: 3, Threads: N/A, Hosts: 9, Hosts/Process: 3


As you can see, I tried first some polls with cmd.php --> no problem. When using cactid, I get these errors about 'Result from SNMP not valid. Partial Result: U...'

I use the compiled cactid.exe = cacti-cactid-0.8.6
I think it's something with cactid itself, so I downloaded the latest cactid beta, but these are not compiled. Searched how to compile it myself, but can't find it how. Is there a manual/procedure to do this or a post with information?

OS = Windows XP
php = 5.0.1
cacti = cacti-0.8.6a-pre20040921
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please run in debug 1 time and post output from logfile so that I can assess what is really going on.

Thanks,

TheWitness

btb: what is the reason for some much processing time on your other 7 hosts?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

See in attachment my log file.

About the large processing time -> is this not normal ?!
I'm running cacti on my Pentium M 1400Mhz. Maybe that's why.
Attachments
cacti.txt
(82.23 KiB) Downloaded 262 times
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please review the DEBUG output and validate that the OID's actually exist. For example, please review the following line:

09/21/2004 10:05:02 PM - CACTID: Poller[0] Host[7] SNMP: v1: vbefs002.gent.volvo.net, dsname: cpu, oid: .1.3.6.1.4.1.23.2.27.3.16.1.4.1, value: U

Use a tool such as Getif (freely downloadable) to check the OID .1.3.6.1.4.1.23.2.27.3.16.1.4.1 and verify that it actually returns a value for this host. It is either that or a timeout.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Guest

Post by Guest »

tapufd: Compiling mini-howto

[root@cacti cacti-cactid-0.8.6a]# ./configure
[root@cacti cacti-cactid-0.8.6a]# make
[root@cacti cacti-cactid-0.8.6a]# make install

This hopefully works. You might wanna type ./configure --help to check other parameters before compiling

-Sigurd
User avatar
Wernicke
Cacti User
Posts: 61
Joined: Tue Jun 08, 2004 3:07 am
Location: Bodø, Norway
Contact:

Post by Wernicke »

forgot to logon
-Sigurd
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

Thanks for the replies.

TheWitness :
I will check if the OID's actually exist.
My question is; why has cmd.php NO problems polling the data, and why cactid.exe has problems with it.
cmd.php & cactid.exe use the same data from the cacti-database, I think?!

Sigurd :
I think the instructions you wrote, are for Linux. I'm a Windows user.

/tap
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests