Dear all,
The snmpget is displaying some strange behaviour when using pass method
to extend the agent. I have a following line in my snmpd.conf file:
pass .1.3.6.1.4.1.96.255.2.0 /tmp/a/test
test is a tiny C-program that looks like this:
# cat test.c
int main() {
sleep(0);
printf(".1.3.6.1.4.1.96.255.2.0\ninteger\n999\n");
exit(0);
}
When I issue snmpget command using the OID, i get the integer 999, as
expected:
# snmpget -v2c -c community machine .1.3.6.1.4.1.96.255.2.0
SNMPv2-SMI::enterprises.96.255.2 = INTEGER: 999
but if I modify the program by changing the line sleep(0); to sleep(1);
and run snmpget the output looks like this:
# snmpget -v2c -c community machine .1.3.6.1.4.1.96.255.2.0
SNMPv2-SMI::enterprises.96.255.2.0 = No Such Instance currently exists at
this OID
This seems quite strange, as if something is timeouting way too soon.
Same happens when sleep is replaced with code that has few system calls or
other "lenghty" operations in it. Can anyone shed some light to what's
happening here, is it a bug or is something misconfigured? The net-snmp
version we're using is 5.1.1.
thanks
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders