xref: /freebsd/contrib/ntp/scripts/ntpsweep/ntpsweep.html (revision ff511f1f398e25b7baca6218e56d15b5ce3ab4a4)
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6<title>ntpsweep User&rsquo;s Manual</title>
7
8<meta name="description" content="ntpsweep User&rsquo;s Manual">
9<meta name="keywords" content="ntpsweep User&rsquo;s Manual">
10<meta name="resource-type" content="document">
11<meta name="distribution" content="global">
12<meta name="Generator" content="makeinfo">
13<link href="#Top" rel="start" title="Top">
14<link href="dir.html#Top" rel="up" title="(dir)">
15<style type="text/css">
16<!--
17a.summary-letter {text-decoration: none}
18blockquote.indentedblock {margin-right: 0em}
19blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20blockquote.smallquotation {font-size: smaller}
21div.display {margin-left: 3.2em}
22div.example {margin-left: 3.2em}
23div.lisp {margin-left: 3.2em}
24div.smalldisplay {margin-left: 3.2em}
25div.smallexample {margin-left: 3.2em}
26div.smalllisp {margin-left: 3.2em}
27kbd {font-style: oblique}
28pre.display {font-family: inherit}
29pre.format {font-family: inherit}
30pre.menu-comment {font-family: serif}
31pre.menu-preformatted {font-family: serif}
32pre.smalldisplay {font-family: inherit; font-size: smaller}
33pre.smallexample {font-size: smaller}
34pre.smallformat {font-family: inherit; font-size: smaller}
35pre.smalllisp {font-size: smaller}
36span.nolinebreak {white-space: nowrap}
37span.roman {font-family: initial; font-weight: normal}
38span.sansserif {font-family: sans-serif; font-weight: normal}
39ul.no-bullet {list-style: none}
40-->
41</style>
42
43
44</head>
45
46<body lang="en">
47<h1 class="settitle" align="center">ntpsweep User&rsquo;s Manual</h1>
48
49
50
51
52
53<a name="Top"></a>
54<div class="header">
55<p>
56Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
57</div>
58<h1 class="node-heading">Top</h1>
59
60<p>This document describes the use of the NTP Project&rsquo;s <code>ntpsweep</code> program.
61</p>
62<p>This document applies to version 4.2.8p13 of <code>ntpsweep</code>.
63</p>
64<a name="SEC_Overview"></a>
65<h2 class="shortcontents-heading">Short Table of Contents</h2>
66
67<div class="shortcontents">
68<li><a name="stoc-Invoking-ntpsweep" href="#toc-Invoking-ntpsweep">1 Invoking ntpsweep</a></li>
69
70</div>
71
72
73<table class="menu" border="0" cellspacing="0">
74<tr><td align="left" valign="top">&bull; ntpsweep Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
75</td></tr>
76<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-Invocation" accesskey="2">ntpsweep Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsweep
77</td></tr>
78</table>
79
80<hr>
81<a name="ntpsweep-Invocation"></a>
82<div class="header">
83<p>
84Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
85</div>
86<a name="Invoking-ntpsweep"></a>
87<h3 class="section">1 Invoking ntpsweep</h3>
88<a name="index-ntpsweep"></a>
89<a name="index-Print-various-informations-about-given-ntp-servers"></a>
90
91<p><code>ntpsweep</code>
92prints per host the NTP stratum level, the clock offset in seconds, the daemon
93version, the operating system and the processor. Optionally recursing through
94all peers.
95</p>
96<p>This section was generated by <strong>AutoGen</strong>,
97using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpsweep</code> program.
98</p>
99<table class="menu" border="0" cellspacing="0">
100<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-usage" accesskey="1">ntpsweep usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpsweep help/usage (<samp>--help</samp>)
101</td></tr>
102<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host_002dlist" accesskey="2">ntpsweep host-list</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host-list option (-l)
103</td></tr>
104<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-peers" accesskey="3">ntpsweep peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
105</td></tr>
106<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-maxlevel" accesskey="4">ntpsweep maxlevel</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">maxlevel option (-m)
107</td></tr>
108<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-strip" accesskey="5">ntpsweep strip</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">strip option (-s)
109</td></tr>
110<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host" accesskey="6">ntpsweep host</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-h)
111</td></tr>
112<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-exit-status" accesskey="7">ntpsweep exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
113</td></tr>
114</table>
115
116<hr>
117<a name="ntpsweep-usage"></a>
118<div class="header">
119<p>
120Next: <a href="#ntpsweep-host_002dlist" accesskey="n" rel="next">ntpsweep host-list</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
121</div>
122<a name="ntpsweep-help_002fusage-_0028_002d_002dhelp_0029"></a>
123<h4 class="subsection">1.1 ntpsweep help/usage (<samp>--help</samp>)</h4>
124<a name="index-ntpsweep-help"></a>
125
126<p>This is the automatically generated usage text for ntpsweep.
127</p>
128<p>The text printed is the same whether selected with the <code>help</code> option
129(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
130the usage text by passing it through a pager program.
131<code>more-help</code> is disabled on platforms without a working
132<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
133used to select the program, defaulting to <samp>more</samp>.  Both will exit
134with a status code of 0.
135</p>
136<div class="example">
137<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p13
138USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
139
140    -l, --host-list=str          Host to execute actions on
141                                   - may appear multiple times
142    -p, --peers                  Recursively list all peers a host synchronizes to
143    -m, --maxlevel=num           Traverse peers up to this level (4 is a reasonable number)
144    -s, --strip=str              Strip this string from hostnames
145    -?, --help                   Display usage information and exit
146        --more-help              Pass the extended usage text through a pager
147
148Options are specified by doubled hyphens and their name or by a single
149hyphen and the flag character.
150</pre></div>
151
152<hr>
153<a name="ntpsweep-host_002dlist"></a>
154<div class="header">
155<p>
156Next: <a href="#ntpsweep-peers" accesskey="n" rel="next">ntpsweep peers</a>, Previous: <a href="#ntpsweep-usage" accesskey="p" rel="prev">ntpsweep usage</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
157</div>
158<a name="host_002dlist-option-_0028_002dl_0029"></a>
159<h4 class="subsection">1.2 host-list option (-l)</h4>
160<a name="index-ntpsweep_002dhost_002dlist"></a>
161
162<p>This is the &ldquo;host to execute actions on&rdquo; option.
163This option takes a string argument.
164</p>
165<p>This option has some usage constraints.  It:
166</p><ul>
167<li> may appear an unlimited number of times.
168</li></ul>
169
170<p>Use this option to specify the host on which this script operates.
171            May appear multiple times.
172</p><hr>
173<a name="ntpsweep-peers"></a>
174<div class="header">
175<p>
176Next: <a href="#ntpsweep-maxlevel" accesskey="n" rel="next">ntpsweep maxlevel</a>, Previous: <a href="#ntpsweep-host_002dlist" accesskey="p" rel="prev">ntpsweep host-list</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
177</div>
178<a name="peers-option-_0028_002dp_0029"></a>
179<h4 class="subsection">1.3 peers option (-p)</h4>
180<a name="index-ntpsweep_002dpeers"></a>
181
182<p>This is the &ldquo;recursively list all peers a host synchronizes to&rdquo; option.
183This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
184</p><hr>
185<a name="ntpsweep-maxlevel"></a>
186<div class="header">
187<p>
188Next: <a href="#ntpsweep-strip" accesskey="n" rel="next">ntpsweep strip</a>, Previous: <a href="#ntpsweep-peers" accesskey="p" rel="prev">ntpsweep peers</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
189</div>
190<a name="maxlevel-option-_0028_002dm_0029"></a>
191<h4 class="subsection">1.4 maxlevel option (-m)</h4>
192<a name="index-ntpsweep_002dmaxlevel"></a>
193
194<p>This is the &ldquo;traverse peers up to this level (4 is a reasonable number)&rdquo; option.
195This option takes a number argument.
196This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
197</p><hr>
198<a name="ntpsweep-strip"></a>
199<div class="header">
200<p>
201Next: <a href="#ntpsweep-host" accesskey="n" rel="next">ntpsweep host</a>, Previous: <a href="#ntpsweep-maxlevel" accesskey="p" rel="prev">ntpsweep maxlevel</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
202</div>
203<a name="strip-option-_0028_002ds_0029"></a>
204<h4 class="subsection">1.5 strip option (-s)</h4>
205<a name="index-ntpsweep_002dstrip"></a>
206
207<p>This is the &ldquo;strip this string from hostnames&rdquo; option.
208This option takes a string argument.
209This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
210</p><hr>
211<a name="ntpsweep-host"></a>
212<div class="header">
213<p>
214Next: <a href="#ntpsweep-exit-status" accesskey="n" rel="next">ntpsweep exit status</a>, Previous: <a href="#ntpsweep-strip" accesskey="p" rel="prev">ntpsweep strip</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
215</div>
216<a name="host-option-_0028_002dh_0029"></a>
217<h4 class="subsection">1.6 host option (-h)</h4>
218<a name="index-ntpsweep_002dhost"></a>
219
220<p>This is the &ldquo;specify a single host&rdquo; option.
221This option takes a string argument.
222This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
223</p>
224<p><strong>NOTE</strong><strong>: THIS OPTION IS DEPRECATED</strong>
225</p><hr>
226<a name="ntpsweep-exit-status"></a>
227<div class="header">
228<p>
229Previous: <a href="#ntpsweep-host" accesskey="p" rel="prev">ntpsweep host</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
230</div>
231<a name="ntpsweep-exit-status-1"></a>
232<h4 class="subsection">1.7 ntpsweep exit status</h4>
233
234<p>One of the following exit values will be returned:
235</p><dl compact="compact">
236<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
237<dd><p>Successful program execution.
238</p></dd>
239<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
240<dd><p>The operation failed or the command syntax was not valid.
241</p></dd>
242</dl>
243<hr>
244
245
246
247</body>
248</html>
249