Re: NET-SNMP-EXTEND-MIB private extension question

Robert Welz <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Am 12.08.2008 um 10:21 schrieb Dave Shield:

> 2008/8/12 Robert Welz <[email protected]>:
>> I have a script, called from net-snmpd 5.4.1:
>>
>> snmpwalk -v 2c -c rocommunity develop NET-SNMP-EXTEND-
>> MIB::nsExtendOutLine
>>
>> NET-SNMP-EXTEND-MIB::nsExtendOutLine."temperatur".1 = STRING:
>> Connection closed by foreign host.
>> NET-SNMP-EXTEND-MIB::nsExtendOutLine."temperatur".2 = STRING:  +36.0;
>> +36.0;    0;4738512;704332;22821156;21388404;1;41
>>
>> which gives two lines of output. What do I have to do to choose
>> between the lines of output?
>
>  $ snmpget -v 2v -c rocommunity develop
>        NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"temperatur\".1

snmpget -v 2c -c rocommunity develop NET-SNMP-EXTEND- 
MIB::nsExtendOutLine.\"temperatur\".1

works perfectly.

> Remember that you need to escape the quote characters,
> so that they are interpreted by the snmpget command,
> not the shell.
>
>
>> hacking with the OID does not work either:
>>
>> snmpwalk -v 2c -c rocommunity develop .1.3.6.1.4.1.8072.1.3.2.4
>> NET-SNMP-EXTEND-MIB::nsExtendOutLine."temperatur".1 = STRING:
>> Connection closed by foreign host.
>> NET-SNMP-EXTEND-MIB::nsExtendOutLine."temperatur".2 = STRING:  +36.0;
>> +35.0;    0;4738512;704332;22821156;21388404;1;41
>
> Well, it would if you did it right:
>
>    snmpget ...
> . 
> 1.3.6.1.4.1.8072.1.3.2.4.1.2.10.116.101.109.112.101.114.97.116.117.114.1
>
> 1.3.6.1.4.1.8072.1.3.2.4.1.2  is the OID of nsExtendOutLine
> 10  is the length of the string "temperatur"
> 116....114 are the ASCII values of the characters of "temperatur"
> and 1 is the index of a particular line of output.

this is the complete explanation, super, thank you!

>
> Dave
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>



---
Robert




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.