LinHES Forums http://forums.linhes.org/ |
|
What is simplest way to enable time sync with a time server? http://forums.linhes.org/viewtopic.php?f=1&t=857 |
Page 1 of 1 |
Author: | notivo [ Sun Feb 29, 2004 6:32 pm ] |
Post subject: | What is simplest way to enable time sync with a time server? |
Anyone know the easiest way to do this at boot-up. Also from the KnoppMyth, what's the easiest way to install such a tool apt-get? |
Author: | cesman [ Sun Feb 29, 2004 6:49 pm ] |
Post subject: | |
Someone has already posted instructions on this... |
Author: | wrooster [ Sun Feb 29, 2004 8:54 pm ] |
Post subject: | |
from http://mysettopbox.tv/phpBB2/viewtopic.php?t=804 Quote: by the way, not being debian-fluent, i had to hunt a bit to learn how to configure ntpd under knoppmyth. this page has all of the info you need:
http://www.metaconsultancy.com/whitepapers/setup.htm the network time protocol daemon "ntpd" is already installed with knoppmyth -- all you need to do is follow the instructions above to generate a ntp.conf configuration file. the resultant config file will look something like this: Code: # /etc/ntp.conf, configuration for ntpd
driftfile /var/log/ntp.drift statsdir /var/log/ntpstats/ server 192.168.100.180 the "server" line at the end is the IP of the NTP server on your network (ideal) or on the internet. in my case i have a solaris box (192.168.100.180) that is slaved to an external stratum 1 source. so i use it for my timing needs. if you want to reconfigure your /etc/ntp.conf by hand, do it and then just run $ /etc/init.d/ntp restart ntpd, when synchronized to an external clock source, will keep your system time correct without any manual intervention and will also accomodate daylight savings time changes. accuracy will be dependent on network latency (that's why it's good to pick a nearby server) and timing jitter (variation in the round trip latency of time data). the accuracy of your PC's internal clock oscillator has no bearing once ntpd has synchronized to an external source. note that it is a "good thing" to use more than one NTP server in your conf file. just put each on a separate "server xxx.xxx.xxx.xxx" line. ntpd will figure out which is the best source and even switch over to an alternate if that first source should become unreachable. for the time server, you can use the NTP host time.windows.com which currently resolves to (ronin)$ dnsip time.windows.com 207.46.130.100 there is full docs for the NTP protocol etc here http://www.ntp.org/ also on that site are lists of "open" NTP servers, like time.windows.com and so forth. DO NOT USE A STRATUM 1 NTP SERVER TO SYNC TO. these hosts are not set up for casual use access (like MythTV) and if the bandwidth is excessive the owner(s) will shut off general access. so be a nice netizen. you can get more info on using open NTP servers here: http://www.eecis.udel.edu/~mills/ntp/servers.html you can also periodically set your system clock via cron using the ntpdate commandm as such... # ntpdate time.windows.com just set that up to run once a day or every 6 hours or whatever. jim |
Author: | minaural [ Mon Nov 08, 2004 11:33 am ] |
Post subject: | |
another way of doing it is by adding this to your root crontab: Code: * 3 * * * /usr/sbin/rdate -s clock.fmt.he.net >> /dev/null
updates from the ntp server "clock.fmt.he.net" at 3am every day. |
Author: | wrooster [ Mon Nov 08, 2004 2:20 pm ] |
Post subject: | |
Code: * 3 * * * /usr/sbin/rdate -s clock.fmt.he.net >> /dev/null
the problem with rdate (or ntpdate for that matter) is that it can result in your clock being set backwards (causing, among other things, problems with repeated cron jobs) or too far forward (causing other problems, like missed crons). this problem is evident with any "step function" type time setting. furthermore, there is no protection inherent in rdate to prohibit gross time changes. if the chosen time server is disfunctional and you rdate to it, your machine will now have a time that could be off by seconds or minutes or hours or days or weeks or ... the NTP protocol guarantees that time is always monotonically increasing; that is, the slew rate of the time change is controlled such that time doesn't go backwards nor forward too quickly. initially this causes puzzled questions such as "i just started ntpd and it isn't working; the time is still off by a few dozen seconds -- what's wrong?". but this is inherent in the protocol and results in nice temporal behavior as ntpd brings the machine into synchronization with the server(s). finally, the problem of gross changes is addressed two ways: first, NTP will not change your system clock by more than 120 seconds, ever. this is built in to prevent the client from being screwed up by a disfunctional server. second, with NTP you can have multiple servers; if one acts up (i.e., it doesn't agree with the other servers or has unacceptably long delay or jitter intervals), it is dropped from the pool and not used as part of client synchronization. jim |
Author: | WillJitsu [ Mon Nov 08, 2004 3:57 pm ] |
Post subject: | |
FYI...there are step-by-step instructions on the KnoppMythWiki: http://knoppmythwiki.homelinux.org/inde ... onizeHowTo |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |