11573Srgrimes\input texinfo @c -*-texinfo-*- 21573Srgrimes@c %**start of header 31573Srgrimes@setfilename ntpdc.info 41573Srgrimes@settitle ntpdc: NTPD Control User's Manual 51573Srgrimes@include ../sntp/include/version.texi 61573Srgrimes@paragraphindent 2 71573Srgrimes@c %**end of header 81573Srgrimes 91573Srgrimes@ifinfo 101573SrgrimesThis file documents the use of the NTP Project's ntpdc, a program for 111573Srgrimescontrolling ntpd. 121573Srgrimes@end ifinfo 131573Srgrimes 141573Srgrimes@direntry 151573Srgrimes* ntpdc: (ntpdc). ntpd Control program 16148834Sstefanf@end direntry 171573Srgrimes 181573Srgrimes@titlepage 191573Srgrimes@title ntpdc: NTPD Control User's Manual 201573Srgrimes@subtitle ntpdc, version @value{VERSION}, @value{UPDATED} 211573Srgrimes@c @author Max @email{foo@ntp.org} 221573Srgrimes@end titlepage 231573Srgrimes 241573Srgrimes@c @page 251573Srgrimes@c @vskip 0pt plus 1filll 261573Srgrimes 271573Srgrimes@node Top, ntpdc Description, (dir), (dir) 281573Srgrimes@top ntpdc: NTPD Control User Manual 291573Srgrimes 301573SrgrimesThis document describes the use of the NTP Project's @code{ntpdc} program, 311573Srgrimesthat can be used to query a Network Time Protocol (NTP) server and 321573Srgrimesdisplay the time offset of the system clock relative to the server 33148834Sstefanfclock. Run as root, it can correct the system clock to this offset as 3484260Sobrienwell. It can be run as an interactive command or from a cron job. 351573Srgrimes 361573SrgrimesThis document applies to version @value{VERSION} of @code{ntpdc}. 371573Srgrimes 381573SrgrimesThe program implements the SNTP protocol as defined by RFC 5905, the NTPv4 391573SrgrimesIETF specification. 401573Srgrimes 4184260Sobrien@shortcontents 421573Srgrimes 431573Srgrimes@menu 4484260Sobrien* ntpdc Description:: Description 4584260Sobrien* ntpdc Invocation:: Invoking ntpdc 4684260Sobrien* Usage:: Usage 471573Srgrimes@end menu 481573Srgrimes 491573Srgrimes@node ntpdc Description 501573Srgrimes@comment node-name, next, previous, up 5184260Sobrien@section Description 5284260Sobrien 5384260SobrienBy default, @code{ntpdc} writes the local data and time (i.e., not UTC) to the 5484260Sobrienstandard output in the format: 5584260Sobrien 5684260Sobrien@example 5784260Sobrien1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs 5884260Sobrien@end example 5984260Sobrien 6084260Sobrienwhere 611573SrgrimesYYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time, 621573Srgrimes(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC), 6384260Sobrienand 6484260Sobrienthe +4.567 +/- 0.089 secs indicates the time offset and 651573Srgrimeserror bound of the system clock relative to the server clock. 66148834Sstefanf 6784260Sobrien@include invoke-ntpdc.texi 6884260Sobrien 6984260Sobrien@node Usage 7084260Sobrien@comment node-name, next, previous, up 7184260Sobrien@section Usage 7284260Sobrien 7384260SobrienThe simplest use of this program is as an unprivileged command to 741573Srgrimescheck the current time, offset, and error in the local clock. 751573SrgrimesFor example: 76 77@example 78ntpdc ntpserver.somewhere 79@end example 80 81With suitable privilege, it can be run as a command or in a 82@code{cron} job to reset the local clock from a reliable server, like 83the @code{ntpdate} and @code{rdate} commands. 84For example: 85 86@example 87ntpdc -a ntpserver.somewhere 88@end example 89