components/ntp/manpages/ntprc.4
author Brian Utterback <Brian.Utterback@Oracle.COM>
Fri, 08 Apr 2011 05:28:01 -0700
changeset 172 093198acf7d4
child 181 87e11e685b1f
permissions -rw-r--r--
7018272 Move NTP to userland 7034365 NTP html docs is missing tickadj, has duplicate of Interleave Modes instead.

'\" te
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\" CDDL HEADER END
.\"
.\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
.\"
.TH "ntprc" "4" "" "" "File Formats"
.SH NAME
ntprc \- file to initialize perferences for NTP programs
.SH DESCRIPTION
.LP
The \fB\&.ntprc\fR file contains data used to initialize certain parameters 
for various NTP related programs. When these programs are started, the current
directory is searched for the existence of the \fB\&.ntprc\fR file.
If found, the file is read and searched for a section header that specifies
the program being run. If such a section is found, then the lines in that section are used to initialize the program. If such a section is not found and no
other sections are found, then the whole file is used do the initialization.
If the file is not found in the current directory, the users home directory is
searched if found then it is processed as above.
.LP
The \fB.ntprc\fR file is a text file, with each line specifying the settings of a command line flag. The flags
are indicated by the use of the flag's long name. Anything after the long name on the line is used to 
set the value of the flag if it takes a value. The same file is used by several \fBNTP\fR programs, so to separate
which lines go with which programs, the file is split into sections. Each section is marked with the name
of the corresponding program in all capital letters and inside square brackets.  Comments can be given in the
file by beginning the comment line with a "#" in the first column. 
.LP 
The best way to set the lines in the file is to run the command in question with all of the flags the way 
you want them and to give the \fB--save-opts\fR \fIfilename\fR flag at the end to save the parameters to a
file. After that, simply edit the resulting file to remove the comments and add the section header and
then append the file to the \fB.ntprc\fR file.  
.SH EXAMPLES
.LP
\fBExample 1 \fRA Sample \fB\&.ntprc\fR File
.LP
A \fB\&.ntprc\fR file containing the following lines:
.sp
.in +2
.nf
[NTPQ]
numeric
command rv 0
[NTPDC]
peers
.fi
.in -2

.LP
will force the \fBntpq\fR program to always execute the "rv 0" command and print the results
with IP addresses and not hostname. It will also cause the \fBntpdc\fR program to always run
as if the \fB--peers\fR option was given.
.SH FILES
.sp
.ne 2
.mk
.na
\fB\fB~/.ntprc\fR\fR
.ad
.RS 12n
.rt  

.RE
.SH ATTRIBUTES
See
.BR attributes (5)
for descriptions of the following attributes:
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Availabilityservice/network/ntp
=
Interface StabilityUncommitted
.TE
.SH SEE ALSO
.LP
\fBntpq\fR(1M), \fBntpdc\fR(1M), \fBntp-keygen\fR(1M)