Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ntpdate(1M) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xntpd(1M)






       ntpdate(1M)                                              ntpdate(1M)


       NAME
             ntpdate - set the date and time via NTP

       SYNOPSIS
             ntpdate [-bdos] [-a keynum] [-e authdelay] [-k keyfile] [-p samples]
                   [-t timeout] server ...

       DESCRIPTION
             The ntpdate command sets the local date and time by polling
             the Network Time Protocol server(s) on the host(s) given as
             arguments to determine the correct time.  A number of samples
             are obtained from each of the servers specified and the
             standard NTP clock filter and selection algorithms are applied
             to select the best of these.

          Files
             /etc/ntp.keys  encryption keys used by ntpdate.

       USAGE
             ntpdate must be run as a privileged user on the local host.
             Typically, ntpdate can be inserted in the /etc/rc.local
             startup up script to set the time of day at boot time and/or
             can be run from time-to-time via cron(1M).

             Time adjustments are made by ntpdate in one of two ways.

                   If ntpdate determines your clock is off by more than 0.5
                   seconds, it will simply step the time by calling
                   settimeofday [see gettimeofday(2)].

                   If the error is less than 0.5 seconds, ntpdate will, by
                   default, skew the clock's time via a call to adjtime(2)
                   with the offset.

             The latter technique is less disruptive and more accurate when
             the offset is small, and works quite well when ntpdate is run
             by cron(1M) every hour or two.  The adjustment made in the
             latter case is actually 50% larger than the measured offset
             since this will tend to keep a badly drifting clock more
             accurate (at some expense to stability, though this tradeoff
             is usually advantageous).

             Note that ntpdate's reliability and precision will improve
             dramatically with greater numbers of servers.  While a single
             server may be used, better performance and greater resistance
             to insanity on the part of any one server will be obtained by


                           Copyright 1994 Novell, Inc.               Page 1













      ntpdate(1M)                                              ntpdate(1M)


            providing at least three or four servers, if not more.

            ntpdate will decline to set the date if an NTP server daemon
            [for example, xntpd(1M)] is running on the same host.  When
            running ntpdate on a regular basis from cron(1M) as an
            alternative to running a daemon, doing so once every hour or
            two will result in precise enough timekeeping to avoid
            stepping the clock.

         Options
            ntpdate takes the following options:

            -b             Force time adjustment at boot time.  At boot
                           time, it is usually better to always step the
                           time by specifying the -b switch on the command
                           line.

            -d             Enable debugging.  This flag may be used to
                           determine what ntpdate will do without it
                           actually doing it.  Information useful for
                           general debugging will also be printed.

            -o             By default, ntpdate claims to be an NTP version
                           2 implementation in its outgoing packets.  As
                           some older software will decline to respond to
                           version 2 queries, the -o switch can be used to
                           force the program to poll as a version 1
                           implementation instead.

            -s             Log ntpdate activity via the syslog(3G)
                           facility, rather than to the standard output.
                           This option is useful when running ntpdate from
                           cron(1M).

            -a keynum      Authenticate all packets using the key number
                           keynum.

            -e authdelay   Set the authentication processing delay to
                           authdelay seconds [see xntpd(1M)].  This number
                           is usually small enough to be negligible for
                           ntpdate's purposes, though specifying a value
                           may improve timekeeping on very slow CPU's.

            -k keyfile     Read authentication keys from the file keyfile,
                           instead of reading from the default file
                           /etc/ntp.keys.  keyfile should be in the format


                          Copyright 1994 Novell, Inc.               Page 2













       ntpdate(1M)                                              ntpdate(1M)


                            described in xntpd(1M).

             -p samples     Set the number of samples ntpdate acquires from
                            each server to samples, where samples is a
                            value between 1 and 8 inclusive.  The default
                            is 4.

             -t timeout     Set the time ntpdate spends waiting for a
                            response to timeout seconds.  The value
                            specified will be rounded to a multiple of 0.2
                            seconds.  The default is 1 second, a value
                            suitable for polling across a LAN.

       REFERENCES
             xntpd(1M)

































                           Copyright 1994 Novell, Inc.               Page 3








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026