User Tools

Site Tools


aix:time_server

This is an old revision of the document!


Time server act as server

add the following lines to /etc/ntp.conf and restart or start xntpd demon (at restart, uncomment the line xntpd into /etc/rc.tcpip)

#broadcastclient
server 127.127.1.0
fudge 127.127.1.0 stratum 10
server 10.1.1.150
server 10.1.1.151
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Time server client

I started the xntpd daemon from smitty xntpd and now its running. add the following lines to /etc/ntp.conf and restart or start xntpd demon (at restart, uncomment the line xntpd into /etc/rc.tcpip)

#broadcastclient
server 10.1.1.150 prefer
server 10.1.1.151
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Test connexion between host and time server (test UDP connection on a port using nc instead of telnet which is used for TCP), on AIX you can download it as rpm package:

root@timeclient:~# nc -vzu timesrv01 123
timesrv01.mydomain.org [192.168.0.45] 123 (ntp) open

Logging of NTP

There are two basic approaches to how to obtain logs from ntp:

In configuration file of ntp specify logfile:

logconfig =syncevents +peerevents +sysevents +allclock
logfile /var/log/ntp.log

Directly to the syslog according to facility: Add this line to the /etc/ntp.conf

logconfig =all

Add this line to the /etc/syslog.conf file:

daemon.debug   /var/log/syslog.log

make sure that file /var/log/syslog.log exists start/restart syslog via commands

stopsrc -s syslogd 
startsrc -s syslogd

Slew parameter

Slew mode is used to avoid any unwanted time jumps - especially for a Cluster or DB environment. If you only care about preventing time from stepping backward, then use the “-x” flag. This is the most common scenario. If you want to always slew the clock, then use “slewalways yes” in ntp.conf.

chssys -s xntpd -a "-x"

and add the following line into the /etc/ntp.conf:

slewalways yes
aix/time_server.1609532494.txt.gz · Last modified: 2021/01/01 21:21 by 127.0.0.1