AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Setting up AIX ntp client with ntp server running on linux

  • 1.  Setting up AIX ntp client with ntp server running on linux

    Posted Fri September 21, 2007 06:35 PM

    Originally posted by: SystemAdmin


    I have four lpar containers which needs to be in sync with ntp server's time running on linux machine.

    I did the following command, however did not work.

    ntpdate -d 10.10.10.5

    The time is not set properly on my AIX lpars. Is there anything I am missing.

    Any help is appreciated.

    Thx


  • 2.  Re: Setting up AIX ntp client with ntp server running on linux

    Posted Mon September 24, 2007 07:49 AM

    Originally posted by: SystemAdmin


    Let me start by asking the dumb question. What is 10.10.10.5? Is it running an NTP server?

    As an alternative to ntpdate on AIX you may want to try /usr/bin/setclock. It will work in cases where ntpdate does not.

    HTH

    Jim Lane


  • 3.  Re: Setting up AIX ntp client with ntp server running on linux

    Posted Tue September 25, 2007 02:46 AM

    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
    1. ntpdate -q 10.10.10.5
    server 10.10.10.5, stratum 3, offset -3589.505802, delay 0.02888
    25 Sep 01:27:42 ntpdate327854: 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
    1. 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
    1. 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
    1. ntpdate -b 10.10.10.5
    25 Sep 01:26:30 ntpdate577758: 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
    1. lsstart -s xntpd

    You can stop and start your deamon with the following commands, respectively.
    1. lsstop -s xntpd
    2. lsstart -s xntpd

    Regards,
    Leo