How to configure ntp in AIX
In this example we have a two node HACMP cluster and it is important that both nodes are synchronised to the same time.
The master server node1 did not have access to an accurate time server such as an atomic clock, however it was enough for node1 to be the master time server for node2 to ensure that both servers were in sync.
The server
Modify the file /etc/ntp.conf so that it looks something similar to the following.
Ensure that broadcastclient is commented out
#broadcastclient server 127.127.1.0 prefer driftfile /etc/ntp.drift tracefile /etc/ntp.trace
Start the ntp daemon as follows
startsrc -s xntpd
If xntpd fails to start try manually starting xntpd and sending the log output to a file as follows
/usr/sbin/xntpd -l /tmp/ntpd_log
Ensure that the following line is commented out of /etc/rc.tcpip so that xntpd will start at reboot
start /usr/sbin/xntpd "$src_running"
The client
Modify the file /etc/ntp.conf so that it looks something similar to the following.
broadcastclient server node1 driftfile /etc/ntp.drift tracefile /etc/ntp.trace
Start the ntp daemon as follows
startsrc -s xntpd
If xntpd fails to start try manually starting xntpd and sending the log output to a file as follows
/usr/sbin/xntpd -l /tmp/ntpd_log
Ensure that the following line is commented out of /etc/rc.tcpip so that xntpd will start at reboot
start /usr/sbin/xntpd "$src_running"
Verify that you have a server suitable for synchronization. Enter:
ntpdate -d ip.address.of.server
18 Dec 14:01:37 ntpdate[3149944]: 3.4y transmit(192.168.62.9) receive(192.168.62.9) transmit(192.168.62.9) receive(192.168.62.9) transmit(192.168.62.9) receive(192.168.62.9) transmit(192.168.62.9) receive(192.168.62.9) transmit(192.168.62.9) server 192.168.62.9, port 123 stratum 5, precision -18, leap 00, trust 000 refid [192.168.58.2], delay 0.02596, dispersion 0.00000 transmitted 4, in filter 4 reference time: ced60946.1a6cc000 Fri, Dec 18 2009 13:59:34.103 originate timestamp: ced609c1.9a66e000 Fri, Dec 18 2009 14:01:37.603 transmit timestamp: ced609c1.9a585000 Fri, Dec 18 2009 14:01:37.602 filter delay: 0.02602 0.02596 0.02596 0.02596 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000081 0.000018 0.000022 0.000028 0.000000 0.000000 0.000000 0.000000 delay 0.02596, dispersion 0.00000 offset 0.000018 18 Dec 14:01:37 ntpdate[3149944]: adjust time server 192.168.62.9 offset 0.000018
The offset must be less than 1000 seconds for xntpd to synch. If the offset is greater than 1000 seconds, change the time manually on the client and run the ntpdate -d again.
If you get the message, "no server suitable for synchronization found", verify xntpd is running on the server (see above) and that no firewalls are blocking port 123.
Verify that the client is synched.
lssrc -ls xntpd
NOTE: Sys peer should display the IP address or name of your xntp server. This process may take up to 12 minutes.