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 experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture. Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.

RSS feed for comments on this post.

Leave a Reply

You must be logged in to post a comment.