Monitoring time synchronisation on ESXi

As you all probably know vSphere 4 is the latest version where there will be a service console. With the new version VMware ESX 5 there will only be a ESXi version.  Some system administrators are disappointed with this decision  of VMware. Personal I can understand the decision to eliminate the service console, because what doesn’t run on your system cannot cause you any trouble. But like most system administrator I used the service console primarly for troubleshouting and scripting.

So how can we (remotly) troubleshout our vSphere enviroment? Most administrators use the VMware Management Assistant (vMA) for a centralized service console. In the vMA you can find almost all CLI commands which we’re familiar to use, these CLI tools are also called rCLI (Remote CLI). But there is no rCLI command to monitor the status of NTP time synchronization. When we had a service console we where using ntpq to monitor the status of our time synchronization like stratum, reach, jitter and offset. If you like to know more about NTP check this site.
So how can we monitor our NTP status with remote tools?

The answer is:…. ntpq! Yes, you can still monitor remote your NTP status remotely with ntpq. You just have to start ntpq from your Linux server/desktop or from the vMA with the option –peers.
For example:

ntpq –peers vsphere1

Most NTP configuration won’t allow you to remotely query the NTP status. This is configured with the noquery option in the ntp.conf file. By default the noquery option is not set in the ntp.conf file for a vSphere ESXi 4.1 server.  If  you cannot remotely query your vSphere ESXi host:

  • SSH to your vSphere ESXi server (you may have to enable remote tech support).
  • use vi to remote the noquery option from the /etc/ntp.conf file.
  • Restart NTP by evoking the command services.sh restart.

Tip: If your on a Linux machine you may want to use the command:

watch “ntpq –peers [IP or DNS vSphere host]”

The watch command issues the command between the quotes every 2 seconds.

About Michael
Michael Wilmsen is a VMware training/consultant (no specific order) with more than 15 years in the IT industry. Main focus is VMware vSphere, Horizon View and Site Recovery Manager with a deepdive to performance. Michael is VCDX 210, VCAP 4/5 certified, has been rewarded with the vExpert title from 2011, is a PernixPro, Nutanix Tech Champion and a Nutanix Platform Professional.

2 Comments to “Monitoring time synchronisation on ESXi”

  1. By Fred, July 21, 2011 @ 14:46

    doesnt work.
    esxi 4.1

    ~ # cd /etc
    /etc # cat ntp.conf
    restrict default kod nomodify notrap nopeer
    restrict 127.0.0.1
    server x.x.x.x
    driftfile /etc/ntp.drift

    Every 2s: ntpq -peers a.b.c.d Thu Jul 21 13:46:55 2011

    sh: ntpq: not found

  2. By Fred, July 21, 2011 @ 14:46

    doesnt work.
    esxi 4.1

    ~ # cd /etc
    /etc # cat ntp.conf
    restrict default kod nomodify notrap nopeer
    restrict 127.0.0.1
    server x.x.x.x
    driftfile /etc/ntp.drift

    Every 2s: ntpq -peers a.b.c.d Thu Jul 21 13:46:55 2011

    sh: ntpq: not found

RSS feed for comments on this post. TrackBack URI

Leave a Reply

You must be logged in to post a comment.