Linux HowTo: is there any option ntpq for the ntp server connectivity test like ntpdate -d command?

Original Source Link

Is there any option ntpq for the ntp server connectivity test like the ntpdate -d command?

ntpdate -d ntpserverip

This command shows the suitable ntp server for synchronization. What the equivalent for the ntpq command?

ntpdate -d ntpserverip
adjust time server ntpserverip offset 0.101886 sec –> for success response

ntpdate -d ntpserverip
no server suitable for synchronization found –> for fail response

This ntpserverip is not in the ntp.conf. I want to test different a NTP server which is not in the ntp.conf.

If you’re missing the deprecated ntpdate, sntp is a better substitute than ntpq.

By default, sntpntpserverip will query the time without setting the clock (like options -q and -d of ntpdate did), using a random port (like options -u and -d of ntpdate did).

Optionally, include:

  • -4 or -6 to force IPv4 or IPv6 DNS resolution.
  • -d for debugging mode (may be repeated to increase level).
  • -r if you need to use NTP port 123 (if ntpd isn’t already using it).
  • -akeyid if you need MAC authentication.

See also:

Can you just use ntpdate -q ntpserverip?

Otherwise ntpq host ntpserverip might be what you want. It sets the host to query.


This give a good walkthrough of NTP in the web interface:

When you set it, you can add multiple NTP servers to the list and use the ntpq to query it then. There’s a VMware KB article mentioned in that link that pertains to several versions of ESXi.

Tagged : / / /

Leave a Reply

Your email address will not be published. Required fields are marked *