This topic outlines how to configure a Network Time Protocol (NTP) server using ntpd to
ensure that all servers that the instance runs on have similar time settings.
About this task
By default, the NTP server is setup and configuration is handled by the
Db2® installer.
Procedure
To configure hosts as NTP clients:
- Specify the NTP server to synchronize to.
Open the
/etc/ntp.conf file and add the following lines:
server ntp_server_hostname
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
where
ntp_server_hostname represents the hostname or IP address of an NTP server. If
you do not have access to an existing NTP server, refer to the
Setting up an NTP Server by using
ntpd
topic.
- Configure the NTP server to start at system restart:
- Start the NTP server:
- On AIX operating systems,
run the startsrc -s xntpd command.
- On Linux operating systems,
run the server ntp start command.
- Verify that the daemon is synchronized. If the daemon is
significantly not synchronized with the system clock, it can take
over 10 minutes for it to become synchronized.
To ensure
the daemon is synchronized before continuing you can check the "sys
stratum" field:
- On AIX operating systems,
use the output of the
lssrc -ls xntpd command.
- On Linux operating systems,
use the output of the
ntptrace command.
The
sys stratum field should be less then 16
to continue to the next step.
- Finish the synchronization process by running the
ntpdate
-d ntp_server_hostname command.