Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to debug some monitoring code that uses SNMP, and have come across an issue.

If I run snmpwalk -v 1 -c $COMMUNITY $SERVER hrSystemDate.0 on a Windows 2003/2008/2008R2 machine, I get an output like

HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2012-2-16,16:30:21.1

But the same check on a Linux machine (debian) yields.

HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2012-2-16,16:31:23.0,+11:0

The Windows version lacks a timezone.

Is this a known/documented limitation on Microsoft's part? And/or is there another way to get the timezone out by itself?

share|improve this question

2 Answers 2

It is not in SNMP in any way that I can see. However, if you have SMB access and have Samba installed on your management station, you can do:

net time zone -S $SERVER
share|improve this answer
up vote 0 down vote accepted

I've worked out his one.

Instead of using SNMP walks, I can use a internal script (part of nagios/nsclient) to run:

w32tm /monitor /computer:mytimeserver.com

That gives an offset value that takes into consideration a change in timezones (offset is within reasonable bounds when changing from +10 to +11, but breaks if the hour changes +1)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.