Debian Codegraph @

doc/fping.8

raw
1 .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 . ds -- \(*W-
28 . ds PI pi
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31 . ds L" ""
32 . ds R" ""
33 . ds C` ""
34 . ds C' ""
35 'br\}
36 .el\{\
37 . ds -- \|\(em\|
38 . ds PI \(*p
39 . ds L" ``
40 . ds R" ''
41 . ds C`
42 . ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD. Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{\
60 . if \nF \{\
61 . de IX
62 . tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 . if !\nF==2 \{\
65 . nr % 0
66 . nr F 2
67 . \}
68 . \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear. Run. Save yourself. No user-serviceable parts.
74 . \" fudge factors for nroff and troff
75 .if n \{\
76 . ds #H 0
77 . ds #V .8m
78 . ds #F .3m
79 . ds #[ \f1
80 . ds #] \fP
81 .\}
82 .if t \{\
83 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 . ds #V .6m
85 . ds #F 0
86 . ds #[ \&
87 . ds #] \&
88 .\}
89 . \" simple accents for nroff and troff
90 .if n \{\
91 . ds ' \&
92 . ds ` \&
93 . ds ^ \&
94 . ds , \&
95 . ds ~ ~
96 . ds /
97 .\}
98 .if t \{\
99 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 . \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 . \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 . \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 . ds : e
123 . ds 8 ss
124 . ds o a
125 . ds d- d\h'-1'\(ga
126 . ds D- D\h'-1'\(hy
127 . ds th \o'bp'
128 . ds Th \o'LP'
129 . ds ae ae
130 . ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "FPING 8"
136 .TH FPING 8 "2022-02-06" "fping" ""
137 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 fping \- send ICMP ECHO_REQUEST packets to network hosts
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 \&\fBfping\fR [ \fIoptions\fR ] [ \fIsystems...\fR ]
146 .SH "DESCRIPTION"
147 .IX Header "DESCRIPTION"
148 \&\fBfping\fR is a program like \fBping\fR which uses the Internet Control Message
149 Protocol (\s-1ICMP\s0) echo request to determine if a target host is responding.
150 \&\fBfping\fR differs from \fBping\fR in that you can specify any number of targets on the
151 command line, or specify a file containing the lists of targets to ping.
152 Instead of sending to one target until it times out or replies, \fBfping\fR will
153 send out a ping packet and move on to the next target in a round-robin fashion.
154 In the default mode, if a target replies, it is noted and removed from the list
155 of targets to check; if a target does not respond within a certain time limit
156 and/or retry limit it is designated as unreachable. \fBfping\fR also supports
157 sending a specified number of pings to a target, or looping indefinitely (as in
158 \&\fBping\fR ). Unlike \fBping\fR, \fBfping\fR is meant to be used in scripts, so its
159 output is designed to be easy to parse. Current statistics can be obtained without
160 termination of process with signal \s-1SIGQUIT\s0 (^\e from the keyboard on most systems).
161 .SH "OPTIONS"
162 .IX Header "OPTIONS"
163 .IP "\fB\-4\fR, \fB\-\-ipv4\fR" 5
164 .IX Item "-4, --ipv4"
165 Restrict name resolution and IPs to IPv4 addresses.
166 .IP "\fB\-6\fR, \fB\-\-ipv6\fR" 5
167 .IX Item "-6, --ipv6"
168 Restrict name resolution and IPs to IPv6 addresses.
169 .IP "\fB\-a\fR, \fB\-\-alive\fR" 5
170 .IX Item "-a, --alive"
171 Show systems that are alive.
172 .IP "\fB\-A\fR, \fB\-\-addr\fR" 5
173 .IX Item "-A, --addr"
174 Display targets by address rather than \s-1DNS\s0 name. Combined with \-d, the output
175 will be both the ip and (if available) the hostname.
176 .IP "\fB\-b\fR, \fB\-\-size\fR=\fI\s-1BYTES\s0\fR" 5
177 .IX Item "-b, --size=BYTES"
178 Number of bytes of ping data to send. The minimum size (normally 12) allows
179 room for the data that \fBfping\fR needs to do its work (sequence number,
180 timestamp). The reported received data size includes the \s-1IP\s0 header (normally
181 20 bytes) and \s-1ICMP\s0 header (8 bytes), so the minimum total size is 40 bytes.
182 Default is 56, as in \fBping\fR. Maximum is the theoretical maximum \s-1IP\s0 datagram
183 size (64K), though most systems limit this to a smaller, system-dependent
184 number.
185 .IP "\fB\-B\fR, \fB\-\-backoff\fR=\fIN\fR" 5
186 .IX Item "-B, --backoff=N"
187 Backoff factor. In the default mode, \fBfping\fR sends several requests to a
188 target before giving up, waiting longer for a reply on each successive request.
189 This parameter is the value by which the wait time (\fB\-t\fR) is multiplied on each
190 successive request; it must be entered as a floating-point number (x.y). The
191 default is 1.5.
192 .IP "\fB\-c\fR, \fB\-\-count\fR=\fIN\fR" 5
193 .IX Item "-c, --count=N"
194 Number of request packets to send to each target. In this mode, a line is
195 displayed for each received response (this can suppressed with \fB\-q\fR or \fB\-Q\fR).
196 Also, statistics about responses for each target are displayed when all
197 requests have been sent (or when interrupted).
198 .IP "\fB\-C\fR, \fB\-\-vcount\fR=\fIN\fR" 5
199 .IX Item "-C, --vcount=N"
200 Similar to \fB\-c\fR, but the per-target statistics are displayed in a format
201 designed for automated response-time statistics gathering. For example:
202 .Sp
203 .Vb 2
204 \& $ fping \-C 5 \-q somehost
205 \& somehost : 91.7 37.0 29.2 \- 36.8
206 .Ve
207 .Sp
208 shows the response time in milliseconds for each of the five requests, with the
209 \&\f(CW\*(C`\-\*(C'\fR indicating that no response was received to the fourth request.
210 .IP "\fB\-d\fR, \fB\-\-rdns\fR" 5
211 .IX Item "-d, --rdns"
212 Use \s-1DNS\s0 to lookup address of ping target. This allows you to give fping
213 a list of \s-1IP\s0 addresses as input and print hostnames in the output. This is similar
214 to option \fB\-n\fR/\fB\-\-name\fR, but will force a reverse-DNS lookup even if you give
215 hostnames as target (\s-1NAME\-\s0>\s-1IP\-\s0>\s-1NAME\s0).
216 .IP "\fB\-D\fR, \fB\-\-timestamp\fR" 5
217 .IX Item "-D, --timestamp"
218 Add Unix timestamps in front of output lines generated with in looping or counting
219 modes (\fB\-l\fR, \fB\-c\fR, or \fB\-C\fR).
220 .IP "\fB\-e\fR, \fB\-\-elapsed\fR" 5
221 .IX Item "-e, --elapsed"
222 Show elapsed (round-trip) time of packets.
223 .IP "\fB\-f\fR, \fB\-\-file\fR" 5
224 .IX Item "-f, --file"
225 Read list of targets from a file. This option can only be used by the root
226 user. Regular users should pipe in the file via stdin:
227 .Sp
228 .Vb 1
229 \& $ fping < targets_file
230 .Ve
231 .IP "\fB\-g\fR, \fB\-\-generate\fR \fIaddr/mask\fR" 5
232 .IX Item "-g, --generate addr/mask"
233 Generate a target list from a supplied \s-1IP\s0 netmask, or a starting and ending \s-1IP.\s0
234 Specify the netmask or start/end in the targets portion of the command line. If
235 a network with netmask is given, the network and broadcast addresses will be
236 excluded. ex. To ping the network 192.168.1.0/24, the specified command line
237 could look like either:
238 .Sp
239 .Vb 1
240 \& $ fping \-g 192.168.1.0/24
241 .Ve
242 .Sp
243 or
244 .Sp
245 .Vb 1
246 \& $ fping \-g 192.168.1.1 192.168.1.254
247 .Ve
248 .IP "\fB\-h\fR, \fB\-\-help\fR" 5
249 .IX Item "-h, --help"
250 Print usage message.
251 .IP "\fB\-H\fR, \fB\-\-ttl\fR=\fIN\fR" 5
252 .IX Item "-H, --ttl=N"
253 Set the \s-1IP TTL\s0 field (time to live hops).
254 .IP "\fB\-i\fR, \fB\-\-interval\fR=\fI\s-1MSEC\s0\fR" 5
255 .IX Item "-i, --interval=MSEC"
256 The minimum amount of time (in milliseconds) between sending a ping packet
257 to any target (default is 10, minimum is 1).
258 .IP "\fB\-I\fR, \fB\-\-iface\fR=\fI\s-1IFACE\s0\fR" 5
259 .IX Item "-I, --iface=IFACE"
260 Set the interface (requires \s-1SO_BINDTODEVICE\s0 support).
261 .IP "\fB\-l\fR, \fB\-\-loop\fR" 5
262 .IX Item "-l, --loop"
263 Loop sending packets to each target indefinitely. Can be interrupted with
264 Ctrl-C; statistics about responses for each target are then displayed.
265 .IP "\fB\-m\fR, \fB\-\-all\fR" 5
266 .IX Item "-m, --all"
267 Send pings to each of a target host's multiple \s-1IP\s0 addresses (use of option '\-A'
268 is recommended).
269 .IP "\fB\-M\fR, \fB\-\-dontfrag\fR" 5
270 .IX Item "-M, --dontfrag"
271 Set the \*(L"Don't Fragment\*(R" bit in the \s-1IP\s0 header (used to determine/test the \s-1MTU\s0).
272 .IP "\fB\-n\fR, \fB\-\-name\fR" 5
273 .IX Item "-n, --name"
274 If targets are specified as \s-1IP\s0 addresses, do a reverse-DNS lookup on them
275 to print hostnames in the output.
276 .IP "\fB\-N\fR, \fB\-\-netdata\fR" 5
277 .IX Item "-N, --netdata"
278 Format output for netdata (\-l \-Q are required). See: <http://my\-netdata.io/>
279 .IP "\fB\-o\fR, \fB\-\-outage\fR" 5
280 .IX Item "-o, --outage"
281 Calculate \*(L"outage time\*(R" based on the number of lost pings and the interval used (useful for network convergence tests).
282 .IP "\fB\-O\fR, \fB\-\-tos\fR=\fIN\fR" 5
283 .IX Item "-O, --tos=N"
284 Set the typ of service flag (\s-1TOS\s0). \fIN\fR can be either decimal or hexadecimal
285 (0xh) format.
286 .IP "\fB\-p\fR, \fB\-\-period\fR=\fI\s-1MSEC\s0\fR" 5
287 .IX Item "-p, --period=MSEC"
288 In looping or counting modes (\fB\-l\fR, \fB\-c\fR, or \fB\-C\fR), this parameter sets
289 the time in milliseconds that \fBfping\fR waits between successive packets to
290 an individual target. Default is 1000 and minimum is 10.
291 .IP "\fB\-q\fR, \fB\-\-quiet\fR" 5
292 .IX Item "-q, --quiet"
293 Quiet. Don't show per-probe results, but only the final summary. Also don't
294 show \s-1ICMP\s0 error messages.
295 .IP "\fB\-Q\fR, \fB\-\-squiet\fR=\fI\s-1SECS\s0\fR" 5
296 .IX Item "-Q, --squiet=SECS"
297 Like \fB\-q\fR, but additionally show interval summary results every \fI\s-1SECS\s0\fR
298 seconds.
299 .IP "\fB\-r\fR, \fB\-\-retry\fR=\fIN\fR" 5
300 .IX Item "-r, --retry=N"
301 Retry limit (default 3). This is the number of times an attempt at pinging
302 a target will be made, not including the first try.
303 .IP "\fB\-R\fR, \fB\-\-random\fR" 5
304 .IX Item "-R, --random"
305 Instead of using all-zeros as the packet data, generate random bytes.
306 Use to defeat, e.g., link data compression.
307 .IP "\fB\-s\fR, \fB\-\-stats\fR" 5
308 .IX Item "-s, --stats"
309 Print cumulative statistics upon exit.
310 .IP "\fB\-S\fR, \fB\-\-src\fR=\fIaddr\fR" 5
311 .IX Item "-S, --src=addr"
312 Set source address.
313 .IP "\fB\-t\fR, \fB\-\-timeout\fR=\fI\s-1MSEC\s0\fR" 5
314 .IX Item "-t, --timeout=MSEC"
315 Initial target timeout in milliseconds. In the default, non-loop mode, the
316 default timeout is 500ms, and it represents the amount of time that \fBfping\fR
317 waits for a response to its first request. Successive timeouts are multiplied
318 by the backoff factor specified with \fB\-B\fR.
319 .Sp
320 In loop/count mode, the default timeout is automatically adjusted to match
321 the \*(L"period\*(R" value (but not more than 2000ms). You can still adjust the timeout
322 value with this option, if you wish to, but note that setting a value larger
323 than \*(L"period\*(R" produces inconsistent results, because the timeout value can
324 be respected only for the last ping.
325 .Sp
326 Also note that any received replies that are larger than the timeout value, will
327 be discarded.
328 .IP "\fB\-T\fR \fIn\fR" 5
329 .IX Item "-T n"
330 Ignored (for compatibility with fping 2.4).
331 .IP "\fB\-u\fR, \fB\-\-unreach\fR" 5
332 .IX Item "-u, --unreach"
333 Show targets that are unreachable.
334 .IP "\fB\-v\fR, \fB\-\-version\fR" 5
335 .IX Item "-v, --version"
336 Print \fBfping\fR version information.
337 .IP "\fB\-x\fR, \fB\-\-reachable\fR=\fIN\fR" 5
338 .IX Item "-x, --reachable=N"
339 Given a list of hosts, this mode checks if number of reachable hosts is >= N
340 and exits true in that case.
341 .SH "EXAMPLES"
342 .IX Header "EXAMPLES"
343 Generate 20 pings to two hosts in ca. 1 second (i.e. one ping every 50 ms to
344 each host), and report every ping \s-1RTT\s0 at the end:
345 .PP
346 .Vb 1
347 \& $ fping \-\-quiet \-\-interval=1 \-\-vcount=20 \-\-period=50 127.0.0.1 127.0.0.2
348 .Ve
349 .SH "AUTHORS"
350 .IX Header "AUTHORS"
351 .IP "\(bu" 4
352 Roland J. Schemers \s-1III,\s0 Stanford University, concept and versions 1.x
353 .IP "\(bu" 4
354 \&\s-1RL\s0 \*(L"Bob\*(R" Morgan, Stanford University, versions 2.x
355 .IP "\(bu" 4
356 David Papp, versions 2.3x and up
357 .IP "\(bu" 4
358 David Schweikert, versions 3.0 and up
359 .PP
360 \&\fBfping website: <http://www.fping.org>\fR
361 .SH "DIAGNOSTICS"
362 .IX Header "DIAGNOSTICS"
363 Exit status is 0 if all the hosts are reachable, 1 if some hosts
364 were unreachable, 2 if any \s-1IP\s0 addresses were not found, 3 for invalid command
365 line arguments, and 4 for a system call failure.
366 .SH "RESTRICTIONS"
367 .IX Header "RESTRICTIONS"
368 If fping was configured with \f(CW\*(C`\-\-enable\-safe\-limits\*(C'\fR, the following values are
369 not allowed for non-root users:
370 .IP "\(bu" 4
371 \&\fB\-i\fR \fIn\fR, where \fIn\fR < 1 msec
372 .IP "\(bu" 4
373 \&\fB\-p\fR \fIn\fR, where \fIn\fR < 10 msec
374 .SH "SEE ALSO"
375 .IX Header "SEE ALSO"
376 \&\f(CWping(8)\fR