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 format, but
that's not what is passed back from the agent.
> What the get_request is giving me is "0x07d4010705181e00"
That's correct.
hrSystemDate is defined using the syntax DateAndTime,
from SNMPv2-TC. This type is defined as follows:
DateAndTime ::= TEXTUAL-CONVENTION
DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
STATUS current
DESCRIPTION
"A date-time specification.
field octets contents range
- -- -
1 1-2 year* 0..65536
2 3month 1..12
3 4day 1..31
4 5hour 0..23
5 6minutes 0..59
6 7seconds 0..60
(use 60 for leap-second)
7 8deci-seconds 0..9
8 9direction from UTC'+' / '-'
9 10hours from UTC* 0..13
10 11minutes from UTC 0..59
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be
displayed as:
1992-5-26,13:30:15.0,-4:0"
SYNTAX OCTET STRING (SIZE (8 | 11))
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 value.
Dave
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users