This is a discussion on Time Syncronisation within the Linux Networking forums, part of the Linux Forums category; I'm setting up a Debian Sarge box as a mail server. What's the best way to keep the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Dan wrote:
> I'm setting up a Debian Sarge box as a mail server. What's the best > way to keep the time syncronised? Should I run ntpdate as a cron > task? > > Dan Best thing is to run ntp sever imho. Debian comes with two flavors ntp-refclock - Network Time Protocol: daemon for reference clocks ntp-simple - Network Time Protocol: daemon for simple systems if you just want to syncronize one machine, either one of them is ok. ntp has benefit of constantly syncronizing your time and avoiding large differences in time you would have with ntpdate updates. That and and couple more things. I use ntp-refclock. This way other machines on lan can syncronize to a local ntp server, which in turn syncronizes with more precise machines. In case of a network down when more precise machines are not reachable, ntp-refclock can use local clock to provide ntp service to local machines. This way you still have syncronized time on local lan. |
|
|||
|
Dan wrote:
> > I'm setting up a Debian Sarge box as a mail server. What's the best > way to keep the time syncronised? Should I run ntpdate as a cron > task? Do NOT use ntpdate, use chrony instead, see http://chrony.sunsite.dk/ --Frank Elsner |
|
|||
|
After a long battle with technology, Dan <dan@dontspammecauseidontlikit.com>, an earthling, wrote:
> I'm setting up a Debian Sarge box as a mail server. What's the best > way to keep the time syncronised? Should I run ntpdate as a cron > task? No. ntpdate is a utility that is in the process of becoming deprecated. Run full-blown NTP. That involves installing the package "ntp." -- (reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc")) http://www.ntlug.org/~cbbrowne/ntp.html "...Yet terrible as Unix addiction is, there are worse fates. If Unix is the heroin of operating systems, then VMS is barbiturate addiction, the Mac is MDMA, and MS-DOS is sniffing glue. (Windows is filling your sinuses with lucite and letting it set.) You owe the Oracle a twelve-step program." --The Usenet Oracle |
|
|||
|
On Thu, 29 Apr 2004 01:17:02 -0400, Andrey Asadchev wrote:
> Best thing is to run ntp sever imho. Debian comes with two flavors I agree. ntpd gives you much more, at the cost of about 2MB RAM. Set it up once and (unless your selected servers all go out of business) forget it. Run /usr/sbin/ntptrace occasionally to see that it works. > ntp-refclock - Network Time Protocol: daemon for reference clocks > ntp-simple - Network Time Protocol: daemon for simple systems > > if you just want to syncronize one machine, either one of them is ok. This is probably true, if /etc/ntp.conf is properly configured. > I use ntp-refclock. This way other machines on lan can syncronize to a > local ntp server, which in turn syncronizes with more precise machines. > In case of a network down when more precise machines are not reachable, > ntp-refclock can use local clock to provide ntp service to local > machines. This way you still have syncronized time on local lan. I think you've misunderstood what a "reference clock" is. It's an atomic clock such as is maintained at Stratum 1 sites. If you don't have one of those (*obviously* you don't) I think you chose the wrong one. I don't use Debian and don't know about the packaging, but my guess is that the -refclock package simply comes preconfigured to use a local reference clock, whereas the -simple one uses network Stratum 2 servers. You can use remote servers and still provide synchronisation services to local machines a la ntpdate (ntpd -q timeserver). They'll still set their clocks according to the timeserver, even when said timeserver is unable to ntptrace to a real reference clock. IAC you should browse the list of public NTP servers and select a set which is best-suited for your location. Sometimes this means sending email to notify the maintainer of that server. -- /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net or put "not-spam" or "/dev/rob0" in Subject header to reply |
|
|||
|
Dan <dan@dontspammecauseidontlikit.com> writes:
]I'm setting up a Debian Sarge box as a mail server. What's the best ]way to keep the time syncronised? Should I run ntpdate as a cron ]task? No You should run ntp or chrony (which can also keep track of your rtc performance so on reboots the time is correct) iThey continually keep the clock updated, going to the web for more info depending on the reliability of your system clock, and advancing or retarding the time to compensate for problems. Note that ntpdate will advance or retard the clock in jumps, which can cause problems especially on a server where file times change a lot. A jump back can screw up file operations apparently due to the use of time info for determining if files are newer or older. |
|
|||
|
A long time ago, in a galaxy far, far away, "/dev/rob0" <rob0@gmx.co.uk> wrote:
> I don't use Debian and don't know about the packaging, but my guess is > that the -refclock package simply comes preconfigured to use a local > reference clock, whereas the -simple one uses network Stratum 2 > servers. The "refclock" one is specifically for connecting to radio clocks. > You can use remote servers and still provide synchronisation services > to local machines a la ntpdate (ntpd -q timeserver). They'll still set > their clocks according to the timeserver, even when said timeserver is > unable to ntptrace to a real reference clock. > > IAC you should browse the list of public NTP servers and select a set > which is best-suited for your location. Sometimes this means sending > email to notify the maintainer of that server. Alternatively, do a "traceroute" towards the outside, and try the first couple of hosts that you hit as candidates. They're probably at your ISP, and you're obviously permitted to use them, as that's how you're accessing the rest of the Internet. And they are doubtless geographically nearby. You might also try "pool.ntp.org," which implements a round-robin scheme based on DNS to do some load balancing across a fairly large set of public NTP servers. -- let name="cbbrowne" and tld="cbbrowne.com" in name ^ "@" ^ tld;; http://www3.sympatico.ca/cbbrowne/spiritual.html "I take it all back. Microsoft Exchange is RFC compliant. RFC 1925, point three." -- Author unknown |
|
|||
|
On Thu, 29 Apr 2004 17:52:41 +0000, Christopher Browne wrote:
> You might also try "pool.ntp.org," which implements a round-robin > scheme based on DNS to do some load balancing across a fairly large > set of public NTP servers. Oooh! This is a very nice tip. Thank you! I tried it ("host -a pool.ntp.org.") from home and from work (about 1K kilometres away) and I see different results. 15 A records from one, 8 from the other, and only one overlapping in the bunch. -- /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net or put "not-spam" or "/dev/rob0" in Subject header to reply |
|
|||
|
>>I use ntp-refclock. This way other machines on lan can syncronize to a >>local ntp server, which in turn syncronizes with more precise machines. >>In case of a network down when more precise machines are not reachable, >>ntp-refclock can use local clock to provide ntp service to local >>machines. This way you still have syncronized time on local lan. > > > I think you've misunderstood what a "reference clock" is. It's an > atomic clock such as is maintained at Stratum 1 sites. If you don't > have one of those (*obviously* you don't) I think you chose the wrong > one. > > I don't use Debian and don't know about the packaging, but my guess is > that the -refclock package simply comes preconfigured to use a local > reference clock, whereas the -simple one uses network Stratum 2 > servers. English is not my first language so I may have not made myself clear This is a snippet of my ntp.conf server 127.127.1.0 fudge 127.127.1.0 stratum 5 Local server is set to a higher stratum, so if lower stratum servers are available, local clock will never be used. If for some reason lower stratum ntp server become unavaiable and local clock synchronization is not set, local machines will not be able to synchronize to local server and will start drifting apart. When you do have local clock configured, local server will still provide synchronization to local clients since it can reference local clock. Therefore machines will not drift apart. Also over the time, ntp server will figure out the drift of your clock and even when lower stratum servers are not available, it will be able to keep pretty precise time using this value. Atomic clocks is not the only way to use refclock. |