Slashdot Mirror


Do You Have The Time?

RetroGeek writes: "This ZDNet article talks about the perils of the PC clock. And (something I did not know) that Windows XP and Mac OS X both automatically get a time stamp from MicroSoft and Apple respectively. At any rate, my home firewall gets the time every hour from the NIST servers, then each of the machines on my LAN query the time server daemon on the firewall. That way all my home network machines have the same time. And latency on the LAN is next to zero. Now if I can only get my VCR connected. Anyone else running a time server?" So how do you get the time?

16 of 432 comments (clear)

  1. the benefits of accurate timekeeping by lakeland · · Score: 4, Informative

    Personally I arbitarialy declare the firewall as having the same time and use cron to update everyone from that. Since latency between machines is almost equal, everybody is out by the same amount.

    Before anybody thinks it is silly to keep clocks tightly synchronised, try running NFS without it and you'll run into no end of problems. Even as little as one second will cause errors with make. The key is that all clocks must read the same, not that they need to be correct.

    Oh, and don't get fooled into thinking you can accurately synchronise against those atomic clocks. The algorithms they use to average results make a number of incorrect assumptions that will result in you being out by a small constant amount, about as much as if you'd synchronised off an ordinary clock.

  2. In Windows? NetTime... by krez · · Score: 4, Informative

    There's a nice open-source utility at Sourceforge (http://sourceforge.net/projects/nettime/) that I use at work on my Windows machine.

    I like it because it's simple, unobtrusive, and invisible once it's installed.

    --
    =U= "Just because you're not paranoid doesn't mean they aren't out to get you"
    1. Re:In Windows? NetTime... by rehannan · · Score: 4, Informative

      In the interest of multiple opinions, I like Automachron. It's a lot smaller than NetTime (130KB vs. 2MB) and is also unobtrusive. You can make it invisible or stick it in your system tray.

      Here's a screenshot of it running on my system.

  3. http://www.ntp.org by MavEtJu · · Score: 4, Informative

    Go to http://www.ntp.org to get all your time-synchronisation questions answered.

    Also for in- or near-Germany living people: http://www.dcf77.de. Wish I knew it was a german-specific service before I came to .au and found out that my DCF77 receiver didn't work here...

    --
    bash$ :(){ :|:&};:
  4. Re:ntpdate [server] in crontab... by Dr.+Ion · · Score: 5, Informative

    Consider running a proper NTP daemon instead.

    It has the advantage of not jerking your clock around every time you sync. It makes calculated "smooth" adjustments to keep your clock accurate. It can also use multiple servers.

    It's the difference between a perfectly-ticking clock, and one that gets manually reset twice a day to make it (temporarily) accurate.

    The biggest impact this will have is if you do file access across the network or need your timestamps to be reliable. Depending on how much your clock drifts, that ntpdate adjustment could back up several seconds. This can wreck havok on timestamp-dependent things, like "make".

    Most ntpd distributions make this easier to set up than a crontab entry anyway. :)

  5. Coursey is a whinner... by burnsy · · Score: 4, Informative

    UNFORTUNATELY, the clients in Windows and Mac OS aren't ideal. They share two problems: First, they may not synchronize often enough.

    That Coursey sure is a whinner and clearly he does little research. I took me 15 seconnds to find this at Google.

    To control the number of seconds to wait between attempts to synchronize the system clock to an time source on the Internet using the following Windows XP...

    Hive: HKEY_LOCAL_MACHINE
    Key: SYSTEM\CurrentControlSet\Services\W32Time\TimeProv iders\NtpClient
    Name: SpecialPollInterval
    Type: REG_DWORD
    Value: #secondsdesired default

  6. Most cablemodem/DSL head-end routers have the time by Dr.+Ion · · Score: 5, Informative

    If you're on cable or DSL, most of the upstream routers run proper NTP servers, and they're just a hop away. The bandwidth for running an NTP client is minimal.

    To find the nearest NTP server, to a traceroute to a few non-local hosts. Then start at your nearest router and ping each one for a time server using something like 'ntptrace'.

    Near-perfect accuracy, just a trickle of data, and your provider will thank you for using nearby machinery.

  7. I use NTP like this..... by Dr.+Awktagon · · Score: 5, Informative

    On your Red Hat Linux server/firewall/whatever (easily adapted to any NTP setup, really):

    ntp.conf:
    server time.apple.com
    server tick.usno.navy.mil
    server tock.usno.navy.mil
    # In case the network is down
    server 127.127.1.0
    fudge 127.127.1.0 stratum 10

    broadcastdelay 0.008
    authenticate no

    driftfile /etc/ntp/drift
    pidfile /var/run/ntpd.pid
    logfile /var/log/ntpd

    and /etc/ntp/step-tickers has the IP addresses for those hosts, all one line (the Red Hat startup script uses these to set the clock at boot, in case it's WAY out of sync.):

    17.254.0.27 192.5.41.40 192.5.41.41 17.254.0.26 17.254.0.31

    Then on your LAN, have all your other machines use this machine as the time server. That's it! Never set a clock again.

    It's important to have accurate time for many protocols, including HTTP, and also to timestamp your logs accurately for forensics and evidence.

    For even more accurate and secure local timeservers, run a GPS antenna to your roof and buy one of these products.

  8. apt-get install chrony by John+Hasler · · Score: 4, Informative

    The default configuration works with a dialup.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  9. Don't Do That by John+Hasler · · Score: 5, Informative

    "...my home firewall gets the time every hour from the NIST servers,..."

    Don't use stratum one servers for your home network. It's wasteful and unnecessary. Use a stratum 2 or higher server or your ISP's server.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  10. Time Server_s_, plural... by The+Monster · · Score: 5, Informative
    The summary says that you have to get your sync from MS. Fortunately, this is untrue. I see two choices when I'm running XP:
    • time.windows.com
    • time.nist.gov
    Take a wild guess which one I chose...

    But if you want more choices than that:
    This article inspired me to do some dumpster-diving in the Registry... Import this key/value:

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ W32Time\TimeProviders\NtpServer]
    "InputProvider"=dword:00000001
    This allowed me to set my own choice of NTP server, and then synced from it. Like many other MS 'features', the
    default can be changed, if you know how...
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  11. Re:Microsecond accuracy for $25 by shoppa · · Score: 5, Informative
    Did you just have to build a serial cable for that, or did you have to build some other interface electronics to make it talk to your computer?

    The GPS output signals are CMOS/TTL level, not RS-232, so I put them through an MAX 232converter before they come out of the box on the roof and run downstairs to the PC. This is not exotic stuff; TTL to RS-232 converters are pretty much 30 year old technology.

    The protocol is just plain async serial, so no special electronics to encode/decode.

  12. And you can hack the interval, too. by The+Monster · · Score: 5, Informative
    A few more moments perusing the Registry reveals that you can also set the interval between syncs:
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ W32Time\TimeProviders\NtpClient]
    "SpecialPollInterval"=dword:00003840
    The value '3840' there is hex for 14400, the number of seconds in 4 hours. Note that setting
    the key won't affect the next, but the one after that will read this value to determine the time
    for the one after that.
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  13. Re:why go 3rd party ? by TimeGuy · · Score: 4, Informative

    Why go 3rd-party? Because, NET TIME (and Windows Time) is fraught with problems, particularly in a larger network/mixed environment. More detailed info about this at our site http://www.greyware.com/software/domaintime/produc t/w32time.asp Yes, I work for them, but I'd use this even if I didn't.

  14. Re:In Windows? The Fourth Dimension by wideangle · · Score: 4, Informative
    I like Dimension4. Besides the Dr. Who reference, it's 112KB -- smaller than your Automachron.

    Here's the screenshot.

    Plus, it's coded by some guy at Microsoft. :

  15. Leap seconds, dude by shoppa · · Score: 5, Informative
    I once hooked up an NTP server to a GPS receiver (makers name omitted because I don't recall who made it) and found a 13 second error. Obviously the makers test suite hadn't included a check that the time it gave was right.

    It was right. The GPS time epoch is 0000 UT on 6-Jan-1980. Since then UTC has had 13 leap seconds inserted. This offset is available in the NAV message; maybe the version of NTP you used was ignoring that message or maybe that particular GPS receiver didn't implement that message. (Actually, buggy firmware in GPS receivers has been a problem in the past.)