Installing and Administering Internet Services

230 Chapter 7
Configuring NTP
Troubleshooting ntp
Troubleshooting ntp
If ntp is not operating properly, use this section to identify and correct
the problem.
To Find Out if xntpd is Running
Issue the following command to find out if xntpd is running:
/usr/bin/ps -ef | /usr/bin/grep xntpd
This command reports the process identification (PID), current time, and
the command invoked (xntpd). An example output is shown below:
daemon 4484 1 0 Feb 18 0:00 xntpd
user 3691 2396 2 15:08:45 0:00 grep xntp
Ensure syslogd is configured to log daemon information messages to
the file /var/adm/syslog/syslog.log. To check this configuration,
make sure /etc/syslog.conf includes one of the following lines:
*.info /var/adm/syslog/syslog.log
or
daemon.info /var/adm/syslog/syslog.log
If xntpd is not running, check the syslog file for related messages.
NTP Associations
Each NTP daemon must form an association with a time source: a
higher-level (lower stratum) server or, for stratum-1 servers, an external
clock. NTP daemons may form additional associations with peer servers.
To list the NTP associations the local NTP daemon has established, use
the command:
/usr/sbin/ntpq -p
Note that in the output an asterisk (*) must appear next to the node
name to indicate that an association has been formed.
In the example below, the local NTP daemon has established an
association with the NTP daemon on node good.cup.hp, but not with
the node bad: