Re: Retrieving Bit-Field/Hex-String with Perl

"Nikos Balkanas" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <002601c96ff3$df388890$02b2a8c0@tardis>
Sorry for budding in...

Actually, according to the link that Mike posted, you should altogether 
uninstall Net::SNMP, as it will clash with the snmp/net-snmp perl module. 
Please read on the link on how to get the right perl module...

BR,
Nikos
----- Original Message ----- 
From: "Peter Daum" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 06, 2009 10:04 AM
Subject: Re: Retrieving Bit-Field/Hex-String with Perl


> Hi,
>
> Mike Ayers wrote:
>>> From: Peter Daum [mailto:[email protected]]
>>> Sent: Saturday, January 03, 2009 3:22 AM
>>
>>> I am trying to retrieve a bit field containing the error
>>> status of a printer.
>>>
>>> With the command line snmpget program, this works:
>>>
>>> # snmpget -v1 -cpublic printer .1.3.6.1.2.1.25.3.5.1.2.1
>>> HOST-RESOURCES-MIB::hrPrinterDetectedErrorState.1 = Hex-STRING: 00
>>>
>>> With the Net::SNMP module, I can also retrieve the value;
>>>
>>> When I do the same with Net-SNMP, I always get an empty string,
>>> regardless of the actual value:
>>>
>>> my $session = new SNMP::Session(
>>>      DestHost => $host, Version => 1, Community => 'public');
>>> my $result = $session->get($oid));
>>>
>>> Other attributes with "normal" string values are no problem.
>>> Is there anything special I have to do to retrieve binary values?
>>
>> You could try using the net-snmp perl module...
>>
>> http://www.net-snmp.org/wiki/index.php/Which_Perl_module_should_I_use
>
> Did you mean "Net::SNMP"?
>
> I did (see above). I have the impression, that Net-SNMP could have
> some advantages (if it worked ;) but since I can't solve this issue
> (and it seems like nobody else knows what's going on and is willing to
> share the knowledge), at the momement that's just what I do ...
>
> Regards,
>                        Peter
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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 


------------------------------------------------------------------------------
_______________________________________________
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.