Re: Formating the return value
Mohan <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all I am looking for translate API which returns MIB properties and attributes if I pass the Oid from that api. Can anybody suggest about this. We already have snmp translate command line utility is available but I am looking for custom API. Sent from my iPhone > On Aug 28, 2014, at 5:33 PM, Peter Kaagman <[email protected]> wrote: > > Hi there list, > > I’ve been toying around with an example script I’ve found online (thank you rhys) which uses the Perl SNMP module and was wondering a bit about the formatting of the return value > > Say I query a meru controller for mwApOperationalState I get a list of values for the different devices controlled by the device > > Setting “UseEnum” or “UseSprintValue” to 0 wil give me an integer (0,1,2,… depending on the state) > Setting “UseEnum” or “UseSprintValue” to 1 wil give me the integer translated to a string (unknown, online, unlicensed and so on) > > The integer value is just fine for logging purposed (use RRD fort hat), but for a userinterface te translated value is mucht nices. > > When running a query from the command line wil give a value like Online (1) > > So I started looking for a way to controll the format returned myself. Found params like VarFormats and TypeFormats which seem to promise tob e just what I would like to do. But I can’t make head or tail from the description in the Man page. > > Does anyone of you have a – pointer to – example on how to do this, how to use the VarFormats or TypeFormats? > > Peter > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > 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 ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ 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