NTP server

Bill Fink yellowdog-general@lists.terrasoftsolutions.com
Sun Feb 2 17:25:01 2003


Hi Shawn,

On Fri Jan 31 2003, Shawn Dunn wrote:

> Actually, Debian/Sarge, and I get the following message when attempting 
> to get my time synchronization from it:
> 
> fairlane:~# ntpdate falcon
> 13 Jan 06:17:18 ntpdate[6831]: adjust time server 192.168.88.1 offset 
> 0.432622 sec
> fairlane:~# date
> Sun Jan 13 06:17:47 PST 1935
> 
> Now that isn't right, heres what the server thinks the date is:
> 
> falcon:/etc/init.d# date
> Fri Jan 31 09:33:09 PST 2003
> 
> Is this a configuration problem?  or is my machine just hosed?

Actually, if you want to set the time with ntpdate, you need to use
the "-b" option.  The ntp startup script uses:

	/usr/sbin/ntpdate -s -b -p 8 -u <host>

>From the ntpdate HTML man page:

-s
    Divert logging output from the standard output (default) to the
    system syslog facility. This is designed primarily for convenience
    of cron scripts.

[you don't need this if running manually from the command line]

-b
    Force the time to be stepped using the settimeofday() system call,
    rather than slewed (default) using the adjtime() system call. This
    option should be used when called from a startup file at boot time.

-p samples
    Specify the number of samples to be acquired from each server as the
    integer samples, with values from 1 to 8 inclusive. The default is 4.

-u
    Direct ntpdate to use an unprivileged port or outgoing packets. This
    is most useful when behind a firewall that blocks incoming traffic to
    privileged ports, and you want to synchronise with hosts beyond the
    firewall. Note that the -d option always uses unprivileged ports.

Hope this helps.

						-Bill