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:
- Open the terminal window.
- Display the list of peers synchronized with the NTP server.
- 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:
- Remote: IP address or hostname of the NTP server.
- refid: reference clock source used by the NTP server.
- st: Clock source level of NTP server.
- t: Clock deviation of NTP server.
- When: The time of the last successful synchronization.
- Poll: The interval time for the next attempt at synchronization.
- reach: indicator of reachability of NTP server.
- round trip time (in milliseconds)
- Offset: clock offset in milliseconds.
- 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.