Formating the return value
Peter Kaagman <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <221575E3CD5CE14484E2B53BEBF566064F342A60@hermes.atlas.atlascollege.nl> |
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