pass-through strangeness

This is a discussion on pass-through strangeness within the SNMP Users forums, part of the Networking and Network Related category; This is very strange. I have a piece of code to be called as a pass-through that generates some ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-22-2007
Greg G
 
Posts: n/a
Default pass-through strangeness


This is very strange. I have a piece of code to be called as a
pass-through that generates some text. If I hard-code the output, my
call to snmpgetnext works fine. However, if my code actually does the
calculations to return the text, snmpgetnext returns an empty string. I
ran the code to the command line, and *both* versions return exactly the
same thing. The version that does the calculations takes about 1 second
to do the work.

This is with NET-SNMP version: 5.0.9. I am waiting at least 30 seconds
between calls to snmpgetnext.

% myoid.pl -g .1.3.6.1.4.1.2021.8.1.101.600
..1.3.6.1.4.1.2021.8.1.101.600.2007.5.22
string
~Test~User~


% myoid.pl -g .1.3.6.1.4.1.2021.8.1.101.600 | od -x
0000000 2e31 2e33 2e36 2e31 2e34 2e31 2e32 3032
0000020 312e 382e 312e 3130 312e 3630 302e 3230
0000040 3037 2e35 2e32 320a 7374 7269 6e67 0a7e
0000060 5465 7374 7e55 7365 727e 0a00
0000073

With the output being hard-coded:

% sleep 30 ; /usr/sfw/bin/snmpgetnext -t 2 -d -v 1 -c public localhost
..1.3.6.1.4.1.2021.8.1.101.600 ; echo $?

Sending 47 bytes to 127.0.0.1
0000: 30 2D 02 01 00 04 06 70 75 62 6C 69 63 A1 20 02 0-.....public. .
0016: 04 5E DB 76 6B 02 01 00 02 01 00 30 12 30 10 06 .^.vk......0.0..
0032: 0C 2B 06 01 04 01 8F 65 08 01 65 84 58 05 00 .+.....e..e.X..


Received 62 bytes from 127.0.0.1
0000: 30 3C 02 01 00 04 06 70 75 62 6C 69 63 A2 2F 02 0<.....public./.
0016: 04 5E DB 76 6B 02 01 00 02 01 00 30 21 30 1F 06 .^.vk......0!0..
0032: 10 2B 06 01 04 01 8F 65 08 01 65 84 58 8F 57 05 .+.....e..e.X.W.
0048: 16 04 0B 7E 54 65 73 74 7E 55 73 65 72 7E ...~Test~User~

UCD-SNMP-MIB::extOutput.600.2007.5.22 = STRING: ~Test~User~
0

With the output being calculated:

% sleep 30 ; /usr/sfw/bin/snmpgetnext -t 2 -d -v 1 -c public localhost
..1.3.6.1.4.1.2021.8.1.101.600 ; echo $?

Sending 47 bytes to 127.0.0.1
0000: 30 2D 02 01 00 04 06 70 75 62 6C 69 63 A1 20 02 0-.....public. .
0016: 04 4F 66 A9 C3 02 01 00 02 01 00 30 12 30 10 06 .Of........0.0..
0032: 0C 2B 06 01 04 01 8F 65 08 01 65 84 58 05 00 .+.....e..e.X..


Received 51 bytes from 127.0.0.1
0000: 30 31 02 01 00 04 06 70 75 62 6C 69 63 A2 24 02 01.....public.$.
0016: 04 4F 66 A9 C3 02 01 00 02 01 00 30 16 30 14 06 .Of........0.0..
0032: 10 2B 06 01 04 01 8F 65 08 01 65 84 58 8F 57 05 .+.....e..e.X.W.
0048: 16 04 00 ...

UCD-SNMP-MIB::extOutput.600.2007.5.22 = STRING:
0


Any ideas what's going on here?

-Greg G
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:28 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0