get_request against hrSystemDate

2006-11-06 Thread Alan Cooper
I'm having bother with the get_request method. I'm writing a script that will query a device via SNMP to check the system time (it's a nagios check to make sure that devices are polling NTP properly and not falling out of sync). Unfortunately, the get request is returning in format I don't

Re: get_request against hrSystemDate

2006-11-06 Thread Dave Shield
On 06/11/06, Alan Cooper [EMAIL PROTECTED] wrote: I'm doing a get_request for HOST-RESOURCES-MIB::hrSystemDate.0 (1.3.6.1.2.1.25.6.3.1.5.1). A snmpwalk indicates I should be getting returned is something like: 2006-11-4,18:23:55.8 Not quite. The snmpwalk command *displays* the value in this

Re: get_request against hrSystemDate

2006-11-06 Thread Alan Cooper
The actual value is a binary string - 8 (or 11) characters long. Which is exactly what you're receiving. The snmpwalk command then uses the Display-Hint to print this binary string in a more meaningful manner. But it's up to the client side to interpret this - the agent just sends the raw

Re: get_request against hrSystemDate

2006-11-06 Thread Dave Shield
On 06/11/06, Alan Cooper [EMAIL PROTECTED] wrote: OK - I'm still beat though - is there an easy way to translate the binary string to something human readable, Try snprint_value() Dave - Using Tomcat but need to do more?