snmp output U

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

Moderators: Developers, Moderators

bsellis
Posts: 19
Joined: Wed Feb 02, 2005 4:59 pm

Post by bsellis »

Hi - there were no errors when I ran both the script server or cleared the cache. Attached are the screen captures and broken graph. The graph is the CPU graph of the same device that I ran the script_server debug in my last post. It's doing the same thing for all the other graphs on that host template except interface traffic stats, processes, and logged in users.

I'm guessing this is what you need - if not let me know.

Code: Select all

Data Source Debug

/usr/local/rrdtool/bin/rrdtool create \
/Users/cactiuser/rra/florida_cpu_623.rrd \
--step 300  \
DS:cpu:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
Also this is what I am getting for this device when I log in DEBUG:

Code: Select all

02/10/2005 03:07:49 PM - CMDPHP: Poller[0] Host[38] SERVER: /Users/cactiuser/scripts/ss_host_cpu.php ss_host_cpu <ipaddress> <snmpstring>  1 get usage 0, output: U
02/10/2005 03:07:49 PM - CMDPHP: Poller[0] Host[38] SERVER: /Users/cactiuser/scripts/ss_host_cpu.php ss_host_cpu <ipaddress> <snmpstring>  1 get usage 1, output: U 
Thanks
-bsellis
Attachments
1) Show Broken Graph
1) Show Broken Graph
cpu_usage.png (3.32 KiB) Viewed 4612 times
2) Show Broken Graph Data Sources in EDIT Mode
2) Show Broken Graph Data Sources in EDIT Mode
datasource.PNG (21.17 KiB) Viewed 4612 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This must be the infamous php issue, because as I see it all should work. We have not figured why some users are having problems with 4.3.10 and why others don't. It must have something to do with the php.ini. Is it possible to backoff PHP to something > 4.3.6 and < 4.3.10.

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?
bsellis
Posts: 19
Joined: Wed Feb 02, 2005 4:59 pm

Post by bsellis »

Is there anything else I can try or check for first? Anything in the DB?
bsellis
Posts: 19
Joined: Wed Feb 02, 2005 4:59 pm

Post by bsellis »

Ok, I tried downgrading php to 4.3.9 and upgrading to 5.0.3. Still no resolution. The same Windows graphs are still not graphing.
sapofeo
Posts: 13
Joined: Thu Feb 17, 2005 5:23 pm

Post by sapofeo »

I have the exact same issue. FC3, php 4.3.10, cacti 0.8.6c. I have duplicated all steps taken and still have the same problem. Does anyone else have any ideas?

Sapofeo
bsellis
Posts: 19
Joined: Wed Feb 02, 2005 4:59 pm

Post by bsellis »

Just updated Zend Optimizer to 2.5.7. Still having the same problem.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am befuddled. I guess we need to NetMeeting to get it.

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?
hormigo
Posts: 2
Joined: Wed Mar 02, 2005 12:13 pm

Post by hormigo »

same problem in my fc3 server. Any solution?
bsellis
Posts: 19
Joined: Wed Feb 02, 2005 4:59 pm

Post by bsellis »

I haven't found anything yet. I tried rolling back PHP, but I could never determine which version I was actually using.. .the downgrade appeared to be successful but ssh showed 4.3.10 still.
Going to start a new server this week with a fresh instance of Cacti and PHP 4.3.6..then do some testing.
njc
Posts: 2
Joined: Sat Mar 05, 2005 6:11 pm

Same issue but w/ non-SNMP Script

Post by njc »

I am having this same problem using 'ramanage.pl', a script that runs Argus's racount on packet capture files. At first I thought maybe a bug in cactid was causing it to timeout prematurely - the script has to run on large data files and takes several minutes to return results. A 'time -h' reports ramanage.pl runtime on a 157M file (it was running on a 1G file in unofficial tests):

7m3.22s real 2m56.11s user 3m45.55s sys


But once I ran cactid by hand, I got the following output:

---debug output ---------------------------------------------------------------

CACTID: CACTID: Version 0.8.6d starting
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: DEBUG: PHP Script Server Routine Started
CACTID: DEBUG: PHP Script Server About to FORK Child Process
CACTID: DEBUG: PHP Script Server Child FORK Success
CACTID: DEBUG: Confirmed PHP Script Server Running
CACTID: DEBUG: Initial Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[1] SNMP Result: Host does not require SNMP
CACTID: 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='0.000000',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='25',failed_polls='0',availability='100.0000' where id='1'

CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] ERROR: The POPEN timed out

CACTID: Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
CACTID: Host[1] SCRIPT: perl /usr/local/www/data-dist/cacti/scripts/ramanage.pl ip /var/log/argus/argus.out, output: U
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (16,'','2005-03-05 16:08:18','U')
CACTID: Host[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: SQLCMD: replace into settings (name,value) values ('date',NOW())
CACTID: DEBUG: SQLCMD: insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())
CACTID: DEBUG: Thread Cleanup Complete
CACTID: DEBUG: PHP Script Server Shutdown Started
CACTID: DEBUG: PHP Script Server Pipes Closed
CACTID: DEBUG: Allocated Variable Memory Freed
CACTID: DEBUG: MYSQL Free & Close Completed
CACTID: Execution Time: 435.7545 s, Threads: 5, Hosts: 1

---debug output------------------------------------------------------------------

cactid also does not update my .rrd file either. I should also point
out that cmd.php will complete a successful run but not update my .rrd file.
I'm just starting out with cacti, so I'm not clear why that is yet and how these two issues are related.

When run manually, this script consistintently returns its results in colon delimited format. Ex:

4025:28691:17565:11125:11302261:6095265:5206995

I'm using cacti v0.8.6.c and I've included the ramanage.pl script below. If more info is necessary, please let me know.


thanks,
njc


---ramanage.pl-------------------------------------------------------------------
#!/usr/bin/perl -w
use strict;

my $ra_bin = "/usr/local/bin/racount";
my $ra_expr = $ARGV[0] or die &Usage();
my $ra_file = $ARGV[1] or die &Usage();

print &GetRAData() ."\n";

sub GetRAData () {

my $proto;
my $record;
my $total_pkts;
my $src_pkts;
my $dst_pkts;
my $total_bytes;
my $src_bytes;
my $dst_bytes;
my $result;

my $RAResult = `$ra_bin -r $ra_file \-\- $ra_expr`;

foreach ( split(/\n/,$RAResult) ) {

if ( m/sum/ ) {

s/^\s+(.*)$/$1/g;
s/\s+/ /g;

( $proto,
$record,
$total_pkts,
$src_pkts,
$dst_pkts,
$total_bytes,
$src_bytes,
$dst_bytes ) = split(/\s/);

}

}



if ( !defined($total_bytes) ) {
$result = "0:0:0:0:0:0:0";
}
else {

$record = int( $record / 300 );
$total_pkts = int( $total_pkts / 300 );
$src_pkts = int( $src_pkts / 300 );
$dst_pkts = int( $dst_pkts / 300 );
$total_bytes = int( $total_bytes / 300 );
$src_bytes = int( $src_bytes / 300 );
$dst_bytes = int( $dst_bytes / 300 );

$result = $record .":".
$total_pkts .":".
$src_pkts .":".
$dst_pkts .":".
$total_bytes .":".
$src_bytes .":".
$dst_bytes;
}


return $result;

}

sub Usage() {
print "Usage: $0 <raexpr> <rafile>\n";
exit 0;
}


---ramanage.pl--------------------------------------------------------------------
sapofeo
Posts: 13
Joined: Thu Feb 17, 2005 5:23 pm

Post by sapofeo »

I feel better that I'm not the only one. Are we all running FC3?

This is the file I'm using to query for memory usage on a win2k server. I installed SNMP Informant and do get back valid data when doing a verbose query. As everyone else, "output: U", graph values show "nan".

If anyone knows a better way to pull windows memory usage, please enlighten me.
Attachments
host_win_memory.xml
I'm using this to retrieve memory usage on Win2K. SNMP Informant is intalled on the host.
(847 Bytes) Downloaded 151 times
njc
Posts: 2
Joined: Sat Mar 05, 2005 6:11 pm

OS

Post by njc »

Actually I'm running FreeBSD-5.3-Stable - accidently ommitted this from my first post.
sapofeo
Posts: 13
Joined: Thu Feb 17, 2005 5:23 pm

Post by sapofeo »

Tried the template from this thread with the same result. Are we leaning towards a bug at this point?

http://forums.cacti.net/viewtopic.php?t=6255
plocke
Posts: 19
Joined: Tue Feb 01, 2005 1:14 am
Location: Brisbane, Australia

Post by plocke »

I just encountered the same problem late this afternoon, using my own script written in php. I also get the Output: U , with graphs being created with nan.

The script is really basic, returning 1 value and runs fine on the console. I was simply following the HOWTO in the Cacti manual on doing your own simple non-templated script (the steps of which need updating in the manual as options have moved around), and used all the names exactly as it says, except I didn't use the random number generator the HOWTO uses, but my own script instead.

My config is:

Cacti 0.8.6c (from the tar.gz)
SUSE Linux Enterprise Server (SLES) 9.0 (no updates)
Apache 2.0.49 (*)
MySQL 4.0.18 (*)
PHP 4.3.4 (*)
net-snmp 5.1-80.3 (*)

(*) standard versions that come with the OS.

In writing this an idea has just come to me that may be worth a shot. I can't remember if my script outputs the value with or without a carriage return and/or line feed (\r and/or \n) at the end. Either way it may be worth trying the opposite.

I'll give this a go tomorrow and post my results. If someone has already resolved this I'd like to hear the fix.

pete
plocke
Posts: 19
Joined: Tue Feb 01, 2005 1:14 am
Location: Brisbane, Australia

Post by plocke »

No luck so far. I've tried these combinations:

1. echo $out;
2. echo "$out";
3. echo "$out\r\n";
4. echo "$out\n";
5. echo "$out\r";
6. print ($out);

...where $out = 123;

Still the same ol' Output: U message. I'm running out of idea's here. Does any one else have a .php script returning a value/s successfully, and if so paste the method used to output the data from the script.

pete
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests