ntpdc.texi revision 1.1 1 1.1 christos \input texinfo @c -*-texinfo-*-
2 1.1 christos @c %**start of header
3 1.1 christos @setfilename ntpdc.info
4 1.1 christos @settitle ntpdc: NTPD Control User's Manual
5 1.1 christos @include ../sntp/include/version.texi
6 1.1 christos @paragraphindent 2
7 1.1 christos @c %**end of header
8 1.1 christos
9 1.1 christos @ifinfo
10 1.1 christos This file documents the use of the NTP Project's ntpdc, a program for
11 1.1 christos controlling ntpd.
12 1.1 christos @end ifinfo
13 1.1 christos
14 1.1 christos @direntry
15 1.1 christos * ntpdc: (ntpdc). ntpd Control program
16 1.1 christos @end direntry
17 1.1 christos
18 1.1 christos @titlepage
19 1.1 christos @title ntpdc: NTPD Control User's Manual
20 1.1 christos @subtitle ntpdc, version @value{VERSION}, @value{UPDATED}
21 1.1 christos @c @author Max @email{foo (a] ntp.org}
22 1.1 christos @end titlepage
23 1.1 christos
24 1.1 christos @c @page
25 1.1 christos @c @vskip 0pt plus 1filll
26 1.1 christos
27 1.1 christos @node Top, ntpdc Description, (dir), (dir)
28 1.1 christos @top ntpdc: NTPD Control User Manual
29 1.1 christos
30 1.1 christos This document describes the use of the NTP Project's @code{ntpdc} program,
31 1.1 christos that can be used to query a Network Time Protocol (NTP) server and
32 1.1 christos display the time offset of the system clock relative to the server
33 1.1 christos clock. Run as root, it can correct the system clock to this offset as
34 1.1 christos well. It can be run as an interactive command or from a cron job.
35 1.1 christos
36 1.1 christos This document applies to version @value{VERSION} of @code{ntpdc}.
37 1.1 christos
38 1.1 christos The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
39 1.1 christos IETF specification.
40 1.1 christos
41 1.1 christos @shortcontents
42 1.1 christos
43 1.1 christos @menu
44 1.1 christos * ntpdc Description:: Description
45 1.1 christos * ntpdc Invocation:: Invoking ntpdc
46 1.1 christos * Usage:: Usage
47 1.1 christos @end menu
48 1.1 christos
49 1.1 christos @node ntpdc Description
50 1.1 christos @comment node-name, next, previous, up
51 1.1 christos @section Description
52 1.1 christos
53 1.1 christos By default, @code{ntpdc} writes the local data and time (i.e., not UTC) to the
54 1.1 christos standard output in the format:
55 1.1 christos
56 1.1 christos @example
57 1.1 christos 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
58 1.1 christos @end example
59 1.1 christos
60 1.1 christos where
61 1.1 christos YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
62 1.1 christos (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
63 1.1 christos and
64 1.1 christos the +4.567 +/- 0.089 secs indicates the time offset and
65 1.1 christos error bound of the system clock relative to the server clock.
66 1.1 christos
67 1.1 christos @include invoke-ntpdc.texi
68 1.1 christos
69 1.1 christos @node Usage
70 1.1 christos @comment node-name, next, previous, up
71 1.1 christos @section Usage
72 1.1 christos
73 1.1 christos The simplest use of this program is as an unprivileged command to
74 1.1 christos check the current time, offset, and error in the local clock.
75 1.1 christos For example:
76 1.1 christos
77 1.1 christos @example
78 1.1 christos ntpdc ntpserver.somewhere
79 1.1 christos @end example
80 1.1 christos
81 1.1 christos With suitable privilege, it can be run as a command or in a
82 1.1 christos @code{cron} job to reset the local clock from a reliable server, like
83 1.1 christos the @code{ntpdate} and @code{rdate} commands.
84 1.1 christos For example:
85 1.1 christos
86 1.1 christos @example
87 1.1 christos ntpdc -a ntpserver.somewhere
88 1.1 christos @end example
89