Re: [SLUG] Network Time Protocol

From: Derek Glidden (dglidden@illusionary.com)
Date: Fri May 04 2001 - 13:03:51 EDT


"A. Harry Harrison" wrote:
>
> I use this in a cron job every night... may be better ways but this is quick
> and simple.:
>
> rdate -s tock.usno.navy.mil

... and that better way would be NTP. :)

NTP is specifically desgined to avoid this sort of kludgey behaviour as
it's a heirarchical protocol, i.e. many second-tier NTP servers
synchronize to a few first-tier servers, many many third-tier servers
synchronize to many second-tier servers, and your personal machines
synchronize to some third-tier server which alleviates having everyone
on the 'net talking to the same first-tier servers to synchronize their
times and flooding those machines with uneccesary traffic.

It's also an extremely lightweight protocol, so has very little network
overhead. Plus, the protocol is designed to take into account network
latency, so you really do keep your clock very *very* close to "real"
time as determined by the atomic clock.

NTP is also "adaptive" in that it "learns" the average clock skew for
the particular system it's running on. So for example, if it determines
that your machine loses one second every 37 hours, it will only run a
synch check every 37/n hours where 'n' is some value that makes the
clock stay within a certain offset of the "actual" time.

Setting up NTP is not very difficult either. The simplest /etc/ntp.conf
looks like this:

   server ntp1.nks.net
   driftfile /etc/ntp.drift

After which you just run the "ntpd" or "xntpd" daemon (depending on what
the package calls it) which should automatically look for /etc/ntp.conf
for its startup file, and then it just runs and keeps your clock
on-track. (You might need to run 'ntpdate ntp1.nks.net' initially to
set your clock if it's too far off - ntpd typically won't adjust the
clock more than 3600 seconds, although this is also configurable.)

Every distro I've encountered includes an NTP daemon package, called
something like "ntp" or "xntpd". Really, install it and use it. And
since it's there for exactly this purpose, go ahead and point your NTP
client to "ntp1.nks.net" so you don't overwhelm any of the second- or
first-tier servers.

>
> ----- Original Message -----
> From: "Mikes work account" <mrock@stewartsigns.com>
> To: <slug@nks.net>
> Sent: Saturday, May 05, 2001 9:35 AM
> Subject: [SLUG] Network Time Protocol
>
> >
> > Can anyone suggest a Network Time Protocol program that I can use to
> access
> > the National Institute of Standards for the correct time to update my
> Linux
> > boxes??
> >
> >
> > Michael C. Rock
> >

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#!/usr/bin/perl -w
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map
{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;
$t^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)
[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h=5;$_=unxb24,join
"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d=
unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d
>>12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*
8^$q<<6))<<9,$_=$t[$_]^(($h>>=8)+=$f+(~$g&$t))for@a[128..$#a]}
print+x"C*",@a}';s/x/pack+/g;eval 

usage: qrpff 153 2 8 105 225 < /mnt/dvd/VOB_FILENAME \ | extract_mpeg2 | mpeg2dec -

http://www.eff.org/ http://www.opendvd.org/ http://www.cs.cmu.edu/~dst/DeCSS/Gallery/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:18:39 EDT