Originally posted by: SystemAdmin
Hello, this is my first time I reply a message, but hope this can help you.
You can print the difference between the clocks
-
ntpdate -q 10.10.10.5
server 10.10.10.5, stratum 3, offset -3589.505802, delay 0.02888
25 Sep 01:27:42 ntpdate
327854: step time server 10.10.10.5 offset -3589.505802
(In this case the offset is almost 1 hour)
Then to synchronize your clock ONCE type the command
-
ntpdate -b 10.10.10.5
But to synchronize your clock permanently you must start the xntpd daemon.
First you have to know if the ntpd daemon is running
-
lssrc -s xntpd
Subsystem Group PID Status
xntpd tcpip 163942 active
If the daemon xntpd is running then when you try to synchronize with "ntpdate" you are going to get an error
-
ntpdate -b 10.10.10.5
25 Sep 01:26:30 ntpdate
577758: the NTP socket is in use, exiting
To synchronize your clock permanently with the NTP server you must modify the /etc/ntp.conf file, adding the next line at the end of the file.
server 10.10.10.5 prefer
Then start the daemon
-
lsstart -s xntpd
You can stop and start your deamon with the following commands, respectively.
-
lsstop -s xntpd
-
lsstart -s xntpd
Regards,
Leo