Howto set the correct server time

In the last years, I often had the problem that the system time of a linux server was not correct.
There’s a simple way the sync your internal clock with some of these ultra-correct clocks over the internet.
Just use ntpdate.

#ntpdate SERVERADDRESS

Here is a list with public timservers.

3 Responses to Howto set the correct server time

  1. Jonas says:

    djb has a nice tool called “clockspeed” that will slow your clock down or speed it up if needed. Just edit conf-cc and add “–include error.h” so it compiles with modern glibc packages and do a “make; make setup check”. Then perform the following steps:

    1. start the daemon: “# nohup /usr/local/clockspeed/bin/clockspeed &”
    2. give it the current time: “# /usr/local/clockspeed/bin/sntpclock ntp.srv.ip.123 | /usr/local/clockspeed/bin/clockadd”
    3. now, after a few hours give it an updated reading so it can adjust to your clock:
    “# at now + 8 hours
    at> /usr/local/clockspeed/bin/sntpclock ntp.srv.ip.123 > /usr/local/clockspeed/adjust
    at> ^D”

    4. repeat step 3 for “+ 16 hours” and “+ 24 hours” to get a more accurate reading

    5. put a small script into /etc/init.d that starts clockspeed at boottime, something like:
    #!/bin/sh
    /usr/local/clockspeed/bin/clockspeed &

    6. … [need to figure this out]

    7. profit!

  2. Linux Ntp Server says:

    anybody here know of a good site to find more info on linux ntp server? I\’ve got this site bookmarked and im gonna keep checking it out, but i still would like to find a site that covers linux ntp server a little more thoroughly..thanks

  3. printer enclosure says:

    printer enclosure…

    […]Howto set the correct server time « spamcollect – about, all the spam in my life[…]…

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: