in reply to Net::SNMP get_request problem

Actually, I should have pointed out that the line with the commented out IP address was from the CPAN example.
(maybe I should have deleted it :) )
The cmd line code I inherited uses the names format instead, and I don't know what the numbers would be.
Is there any way of continuing to use the names, as it's a darn sight more informative/maintainable?
If not, how do I find out the numbers?
Thx again
Chris

Replies are listed 'Best First'.
Re^2: Net::SNMP get_request problem
by insaniac (Friar) on Sep 30, 2005 at 17:37 UTC
    one quick way to find out the numbers (OIDs) of the names, is to use the snmpwalk or snmpget command with the option -On.
    example:
    insaniac][musashi: ~ : snmpget -On -v1 -cpublic localhost interfaces.i +fTable.ifEntry.ifOutOctets.1 .1.3.6.1.2.1.2.2.1.16.1 = Counter32: 4093056087 insaniac][musashi: ~ : snmpget -v1 -cpublic localhost interfaces.ifTab +le.ifEntry.ifOutOctets.1 IF-MIB::ifOutOctets.1 = Counter32: 4093056087

    to ask a question is a moment of shame
    to remain ignorant is a lifelong shame