Hi net-snmp community,
  I'm trying to use 'extend' functionality in 5.4.2.1 to feed indexed
graph data to Cacti. I moved away from 5.1.2 because of the script
looping issue with exec. Anyway, with 'extend', here's what I have going
on:

OS: RHEL4.6
Kernel: 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686
i686 i386 GNU/Linux

In my smmpd.conf:
extend vhnames /usr/bin/perl /usr/local/mlms/mrtg2cacti/print_vh.pl -vhi

The perl script I'm using calls a bash program for each index instance
using perl backticks like this:
$execute_hoststats=`$hoststats getbandwidth $_
Then it prints the results and a newline.

Results of the script directly thru SSH (for verification):
./print_vh.pl -aut
0
70
70
119
119
137
137
0
0
1
5
14

Looks good, but if it goes through the snmpd agent there are issues...

Results of script through SNMP:
snmpwalk -t 120 -v1 -c public 10.201.0.116
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."vhutil"'
[nag...@nagios01 ~]$ snmpwalk -t 120 -v1 -c MMLSNMP 10.201.0.116
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."vhutil"'
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."vhutil" = STRING: cat: write
error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
0
55
55
112
112
140
140
0
0
1
1

If I limit the lines of output, the breaking point seems to be at 9
lines:
The script only loops 9 times then exits with no errors:

snmpwalk -t 120 -v1 -c MMLSNMP 10.201.0.116
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."vhutil"'
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."vhutil" = STRING: 0
199
141
108
108
141
141
0
0

Is this a bug, a result of my build options, and has it been addressed
yet? Thanks so much for the help.

Regards,

Justin Amburn - Managed Services
MarketLive, Inc.
617B Second St 
Petaluma, CA 94952
Ph: 707-780-1701
Cell: 707-280-6545
[email protected]

This email is confidential and intended for its recipient only. If you
have received this in error please delete it and notify Justin Amburn.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to