Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ntpd(8)

ntpdc(1)

ctime(3)

perror(3)

stime(2)



  ntp(1)                              CLIX                              ntp(1)



  NAME

    ntp - Queries a Network Time Protocol (NTP) daemon

  SYNOPSIS

    ntp [-v] [-s] [-f] host ...

  FLAGS

    -v   Displays verbose output, showing the full contents of received NTP
         packets, plus calculated offset, displacement, and so on.

    -s   Sets the system time-of-day clock on the local host.  The ntp command
         uses the stime() function to set the clock.  The clock is not changed
         if the time offset is greater than 1000 seconds or if the clock on
         the remote host is unsynchronized.  You must be superuser to use this
         flag.

    -f   Forces setting the system clock regardless of the offset.  The -f
         flag must be used with the -s flag.  The clock is not changed if the
         clock on the remote host is unsynchronized.

  DESCRIPTION

    The ntp command process is the Network Time Protocol (NTP) client.  The
    command sends a Network Time Protocol (NTP) packet to the NTP daemon
    running on each of the specified hosts.  The NTP daemon fills in fields of
    the NTP packet as per RFC-1059 and sends the packet back.  The ntp command
    then formats and displays the results on stdout.  A host can be specified
    by its name or Internet address.

    The default output shows the delay, offset, date, and time (in ctime
    format) when the NTP daemon transmitted the packet.

    Flags can reset the time of the local system clock.

  NTP RESULTS

    The default output for each host looks like the following:

    128.8.10.1: delay:1.845207 offset:-0.358460  Mon Mar 20 08:05:44 1989

    The verbose output for each host looks like the following:

    Packet from: [128.8.10.1]
    Leap 0, version 1, mode Server, poll 6, precision -10 stratum 1 (WWVB)
    Synch Distance is 0000.1999  0.099991
    Synch Dispersion is 0000.0000  0.000000
    Reference Timestamp is   a7bea6c3.88b40000   Tue Mar  7 14:06:43 1989
    Originate Timestamp is   a7bea6d7.d7e6e652   Tue Mar  7 14:07:03 1989



  2/94 - Intergraph Corporation                                              1






  ntp(1)                              CLIX                              ntp(1)



    Receive Timestamp is     a7bea6d7.cf1a0000   Tue Mar  7 14:07:03 1989
    Transmit Timestamp is    a7bea6d8.0ccc0000   Tue Mar  7 14:07:04 1989
    Input Timestamp is       a7bea6d8.1a77e5ea   Tue Mar  7 14:07:04 1989
    umd1: delay:0.019028 offset:-0.043890  Tue Mar  7 14:07:04 1989

    The various fields are interpreted as follows:

    Packet from: address
           The Internet address of the remote host the NTP daemon sending this
           NTP packet resides on.

    Leap n The leap second indicator.  A value of 0 means there is no leap
           second, 1 means a leap second is added to the last minute of the
           current day, 2 means a leap second is subtracted from the last
           minute of the current day, and 3 means the clock on the remote host
           is unsynchronized.

    version n
           The version number of the NTP implementation on the remote host.
           Currently, ntp exchanges NTP packets only with NTP daemons that
           implement NTP version 1.

    mode mode
           The mode the remote NTP daemon is operating in toward the local
           host.

    poll exp
           The minimum polling interval between messages sent by the peer,
           specified in seconds as a power of two.

    precision exp
           The claimed precision of the clock, specified in seconds as a power
           of two.  For example, a clock derived from the power line frequency
           (60 Hz) has a precision of 1/60 second (about 2^-6) and would be
           indicated by a precision of -6.

    stratum n (source)
           The stratum of the clock in the NTP hierarchy, along with the
           source of the clock, either the name of a reference standard (such
           as WWVB or GOES) or the Internet address of the clock that
           synchronized this clock.

    The next two numbers are specified as 32-bit hexadecimal, fixed-point
    values with a fraction point between bits 15 and 16, and as double values.

    Synch Distance is fixed double
           The estimated roundtrip delay to the primary synchronizing source,
           in seconds.

    Synch Dispersion is fixed double
           The estimated dispersion to the primary synchronizing source, in



  2                                              Intergraph Corporation - 2/94






  ntp(1)                              CLIX                              ntp(1)



           seconds.

    The next five timestamps are specified as 64-bit hexadecimal, fixed-point
    values with a fraction point between bits 31 and 32, and as a string in
    ctime format.  These timestamps are set either by this ntp command process
    (local time), or by the remote NTP daemon (remote time).

    Reference Timestamp is hex-timestamp ctime-string
           The last time the clock on the remote host was adjusted (remote
           time).

    Originate Timestamp is hex-timestamp ctime-string
           When the NTP request was transmitted by this ntp command process to
           the NTP daemon (local time).

    Receive Timestamp is hex-timestamp ctime-string
           When the NTP request was received by the NTP daemon (remote time).

    Transmit Timestamp is hex-timestamp ctime-string
           When the NTP response was transmitted by the NTP daemon (remote
           time).

    Input Timestamp is hex-timestamp ctime-string
           When the NTP response was received by this ntp command process
           (local time).

    hostname:  delay:time offset:time ctime-string
           The summary of the results of the query, giving the hostname of the
           responding clock (from the command line), the round-trip delay in
           seconds, the offset between the two clocks in seconds (assuming
           symmetric roundtrip times), and a date and time value (in ctime
           format) that is the delay value plus the transmit timestamp.  The
           delay and clock offset values are also calculated from the above
           timestamps.

  EXAMPLES

    1.  To display verbose output of the NTP packets sent from the hosts sam
        and ss, enter:

        ntp -v sam ss


    2.  To set the system time-of-day clock on the local host from the ntpd
        daemon on host sam, enter:

        ntp -s -f sam

        The -f flag is used to change the clock regardless of the time offset.

  FILES



  2/94 - Intergraph Corporation                                              3






  ntp(1)                              CLIX                              ntp(1)



    /etc/resolv.conf
           Domain Name System (DNS) client configuration file.  DNS is the
           preferred method for address resolution.

    /etc/hosts
           Configuration file mapping hostnames to Internet addresses.

  DIAGNOSTICS

    The ntp command displays the appropriate error message with the perror()
    function.  The condition where an error occurs is generally on connect,
    read, and write operations.

  EXIT VALUES

    The ntp command exits with a value of 0 if successful.  If unsuccessful,
    it exits with a nonzero value.

  RELATED INFORMATION

    Commands:  ntpd(8), ntpdc(1)

    Functions:  ctime(3), perror(3), stime(2)































  4                                              Intergraph Corporation - 2/94




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