Time synchronisation

Discussion in 'Linux' started by librarian16, Oct 29, 2008.

  1. librarian16

    librarian16

    Joined:
    Oct 17, 2008
    Messages:
    6
    Likes Received:
    0
    Is there any software that will keep the Aspireone synchronised with the internet, please?
     
    librarian16, Oct 29, 2008
    #1
  2. librarian16

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    This is typically done with a daemon called ntpd. I see that it comes installed on the AAO, however it doesn't look like that service is ever started. A command like this, should start the service:

    sudo /etc/init.d/ntpd start

    (haven't personally tried it).

    But once you get the service running, typically you'd have to configure your date/time system to use a ntp server to get the time as opposed to manually setting it. I don't see where this is an option using the GUI app for setting Date/Time? Maybe just running the service will do this automatically? I haven't tried. My AAO appears to keep perfect time without the need for ntpd.

    Cheers.
     
    rbil, Oct 30, 2008
    #2
  3. librarian16

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    OK, found out how to set the time from a time server once ntpd is running. Apparently this command will set your clock now ...

    sudo ntpdate pool.ntp.org

    I guess you'd want to setup a daily cronjob to keep your clock updated from a time server on the Net.

    Cheers.
     
    rbil, Oct 30, 2008
    #3
  4. librarian16

    cpchan

    Joined:
    Sep 22, 2008
    Messages:
    201
    Likes Received:
    0
    To set up a permanent time server, edit /etc/ntp.conf. Also you do not need a cron job if you run it as a daemon.
     
    cpchan, Oct 30, 2008
    #4
  5. librarian16

    scottro

    Joined:
    Aug 31, 2008
    Messages:
    347
    Likes Received:
    0
    You can run sudo ntpdate. This cannot be run while ntpd is running. The ntpdate command is a one time thing, usually used when the clock is really off.

    Then, as suggested above, run ntpd when starting up, with /etc/init.d/ntpd. I believe the default ntp.conf will work.

    In FreeBSD, there's a way to do it so that the command will synchronize with a server at startup, then continue to run the daemon.
    By default, (in FreeBSD at least) otherwise, the daemon can only handle a certain amount of time slew--rather than setting it drastically in one step, it gradually moves the clock within range of an ntp server.

    Ah, looking at the startup script, it seems that the Linux equivalent is -g. This means that once, at startup, it can violate the time slew limitation and set your system clock to the right time. Looking a bit further, at the /etc/init.d/ntpd script, it seems it will do this if your clock is way off. (At least on CentOS, don't have a Linpus install handy to see if it's the same.)
     
    scottro, Oct 31, 2008
    #5
  6. librarian16

    librarian16

    Joined:
    Oct 17, 2008
    Messages:
    6
    Likes Received:
    0
    Thanks for all the help.
    :)
     
    librarian16, Oct 31, 2008
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.