Installing and Administering Internet Services
310 Chapter7
Configuring the Network Time Protocol (NTP)
Advanced NTP Topics
If you modify the configuration file or the XNTPD_ARGS environment
variable in the file /etc/rc.config.d/netdaemons while xntpd is
running, you have to stop and restart the daemon in order for the
configuration changes to take effect.
To stop xntpd, issue the following command:
/sbin/init.d/xntpd stop
Using ntpq to Query Systems Running xntpd
ntpq is a program used to query systems that are running xntpd about
the current state of the server. It can also be used to obtain a list of a
server’s peers. ntpq sends requests to and receives responses from NTP
time servers using a special form of NTP messages called mode-6
control messages. The program can be run either interactively or from
a command line. See the ntpq man page for details about using this
program.
ntpq is most useful for querying remote NTP implementations to assess
their timekeeping accuracy and to expose problems in configuration or
operation.
NOTE When you specify time-related configuration options in /etc/ntp.conf,
you specify the values in seconds. ntpq, however, displays time values in
milliseconds, as specified by the RFC 1305 NTP standard.
ntpq Verification and Output
Use ntpq to verify the following:
• xntpd can form associations with other NTP hosts.
• Synchronization is taking place correctly.
After xntpd starts, run the ntpq program with the -p option:
/usr/sbin/ntpq -p
The -p option prints a list of NTP hosts known to the server, along with a
summary of their states. After a while, a display like the following