How to use the ntpq -p command in Linux?

The ntpq -p command in Linux is utilized to display the connection and synchronization status with NTP servers.

To use the ntpq -p command, follow these steps:

  1. Open the terminal window.
  2. Display the list of peers synchronized with the NTP server.
  3. Press the Enter key to execute the command.

This will display a detailed list of connection status and synchronization status with NTP servers. Each line in the list represents a different NTP server. The explanations for some possible columns that may appear in the list are as follows:

  1. Remote: IP address or hostname of the NTP server.
  2. refid: reference clock source used by the NTP server.
  3. st: Clock source level of NTP server.
  4. t: Clock deviation of NTP server.
  5. When: The time of the last successful synchronization.
  6. Poll: The interval time for the next attempt at synchronization.
  7. reach: indicator of reachability of NTP server.
  8. round trip time (in milliseconds)
  9. Offset: clock offset in milliseconds.
  10. Jitter: clock jitter (in milliseconds).

The “ntpq -p” command can assist you in understanding the status of the NTP server and checking the synchronization between the system clock and the NTP server.

bannerAds