1FPING(8) FPING(8)
2
3
4
6 fping - send ICMP ECHO_REQUEST packets to network hosts
7
9 fping [ options ] [ systems... ]
10
12 fping is a program like ping which uses the Internet Control Message
13 Protocol (ICMP) echo request to determine if a target host is
14 responding. fping differs from ping in that you can specify any number
15 of targets on the command line, or specify a file containing the lists
16 of targets to ping. Instead of sending to one target until it times
17 out or replies, fping will send out a ping packet and move on to the
18 next target in a round-robin fashion. In the default mode, if a target
19 replies, it is noted and removed from the list of targets to check; if
20 a target does not respond within a certain time limit and/or retry
21 limit it is designated as unreachable. fping also supports sending a
22 specified number of pings to a target, or looping indefinitely (as in
23 ping ). Unlike ping, fping is meant to be used in scripts, so its
24 output is designed to be easy to parse. Current statistics can be
25 obtained without termination of process with signal SIGQUIT (^\ from
26 the keyboard on most systems).
27
29 -4, --ipv4
30 Restrict name resolution and IPs to IPv4 addresses.
31
32 -6, --ipv6
33 Restrict name resolution and IPs to IPv6 addresses.
34
35 -a, --alive
36 Show systems that are alive.
37
38 -A, --addr
39 Display targets by address rather than DNS name. Combined with -d,
40 the output will be both the ip and (if available) the hostname.
41
42 -b, --size=BYTES
43 Number of bytes of ping data to send. The minimum size (normally
44 12) allows room for the data that fping needs to do its work
45 (sequence number, timestamp). The reported received data size
46 includes the IP header (normally 20 bytes) and ICMP header (8
47 bytes), so the minimum total size is 40 bytes. Default is 56, as
48 in ping. Maximum is the theoretical maximum IP datagram size
49 (64K), though most systems limit this to a smaller, system-
50 dependent number.
51
52 -B, --backoff=N
53 Backoff factor. In the default mode, fping sends several requests
54 to a target before giving up, waiting longer for a reply on each
55 successive request. This parameter is the value by which the wait
56 time (-t) is multiplied on each successive request; it must be
57 entered as a floating-point number (x.y). The default is 1.5.
58
59 -c, --count=N
60 Number of request packets to send to each target. In this mode, a
61 line is displayed for each received response (this can suppressed
62 with -q or -Q). Also, statistics about responses for each target
63 are displayed when all requests have been sent (or when
64 interrupted).
65
66 -C, --vcount=N
67 Similar to -c, but the per-target statistics are displayed in a
68 format designed for automated response-time statistics gathering.
69 For example:
70
71 $ fping -C 5 -q somehost
72 somehost : 91.7 37.0 29.2 - 36.8
73
74 shows the response time in milliseconds for each of the five
75 requests, with the "-" indicating that no response was received to
76 the fourth request.
77
78 -d, --rdns
79 Use DNS to lookup address of return ping packet. This allows you
80 to give fping a list of IP addresses as input and print hostnames
81 in the output. This is similar to option -n/--name, but will force
82 a reverse-DNS lookup even if you give hostnames as target
83 (NAME->IP->NAME).
84
85 -D, --timestamp
86 Add Unix timestamps in front of output lines generated with in
87 looping or counting modes (-l, -c, or -C).
88
89 -e, --elapsed
90 Show elapsed (round-trip) time of packets.
91
92 -f, --file
93 Read list of targets from a file. This option can only be used by
94 the root user. Regular users should pipe in the file via stdin:
95
96 $ fping < targets_file
97
98 -g, --generate addr/mask
99 Generate a target list from a supplied IP netmask, or a starting
100 and ending IP. Specify the netmask or start/end in the targets
101 portion of the command line. If a network with netmask is given,
102 the network and broadcast addresses will be excluded. ex. To ping
103 the network 192.168.1.0/24, the specified command line could look
104 like either:
105
106 $ fping -g 192.168.1.0/24
107
108 or
109
110 $ fping -g 192.168.1.1 192.168.1.254
111
112 -h, --help
113 Print usage message.
114
115 -H, --ttl=N
116 Set the IP TTL field (time to live hops).
117
118 -i, --interval=MSEC
119 The minimum amount of time (in milliseconds) between sending a
120 ping packet to any target (default is 10, minimum is 1).
121
122 -I, --iface=IFACE
123 Set the interface (requires SO_BINDTODEVICE support).
124
125 -l, --loop
126 Loop sending packets to each target indefinitely. Can be
127 interrupted with Ctrl-C; statistics about responses for each
128 target are then displayed.
129
130 -m, --all
131 Send pings to each of a target host's multiple IP addresses (use
132 of option '-A' is recommended).
133
134 -M, --dontfrag
135 Set the "Don't Fragment" bit in the IP header (used to
136 determine/test the MTU).
137
138 -n, --name
139 If targets are specified as IP addresses, do a reverse-DNS lookup
140 on them to
141
142 -N, --netdata
143 Format output for netdata (-l -Q are required). See:
144 <http://my-netdata.io/>
145
146 -o, --outage
147 Calculate "outage time" based on the number of lost pings and the
148 interval used (useful for network convergence tests).
149
150 -O, --tos=N
151 Set the typ of service flag (TOS). N can be either decimal or
152 hexadecimal (0xh) format.
153
154 -p, --period=MSEC
155 In looping or counting modes (-l, -c, or -C), this parameter sets
156 the time in milliseconds that fping waits between successive
157 packets to an individual target. Default is 1000 and minimum is
158 10.
159
160 -q, --quiet
161 Quiet. Don't show per-probe results, but only the final summary.
162 Also don't show ICMP error messages.
163
164 -Q, --squiet=SECS
165 Like -q, but show summary results every n seconds.
166
167 -r, --retry=N
168 Retry limit (default 3). This is the number of times an attempt at
169 pinging a target will be made, not including the first try.
170
171 -R, --random
172 Instead of using all-zeros as the packet data, generate random
173 bytes. Use to defeat, e.g., link data compression.
174
175 -s, --stats
176 Print cumulative statistics upon exit.
177
178 -S, --src=addr
179 Set source address.
180
181 -t, --timeout=MSEC
182 Initial target timeout in milliseconds. In the default, non-loop
183 mode, the default timeout is 500ms, and it represents the amount
184 of time that fping waits for a response to its first request.
185 Successive timeouts are multiplied by the backoff factor specified
186 with -B.
187
188 In loop/count mode, the default timeout is automatically adjusted
189 to match the "period" value (but not more than 2000ms). You can
190 still adjust the timeout value with this option, if you wish to,
191 but note that setting a value larger than "period" produces
192 inconsistent results, because the timeout value can be respected
193 only for the last ping.
194
195 Also note that any received replies that are larger than the
196 timeout value, will be discarded.
197
198 -T n Ignored (for compatibility with fping 2.4).
199
200 -u, --unreach
201 Show targets that are unreachable.
202
203 -v, --version
204 Print fping version information.
205
206 -x, --reachable=N
207 Given a list of hosts, this mode checks if number of reachable
208 hosts is >= N and exits true in that case.
209
211 Generate 20 pings to two hosts in ca. 1 second (i.e. one ping every 50
212 ms to each host), and report every ping RTT at the end:
213
214 $ fping --quiet --interval=1 --vcount=20 --period=50 127.0.0.1 127.0.0.2
215
217 · Roland J. Schemers III, Stanford University, concept and versions
218 1.x
219
220 · RL "Bob" Morgan, Stanford University, versions 2.x
221
222 · David Papp, versions 2.3x and up
223
224 · David Schweikert, versions 3.0 and up
225
226 fping website: <http://www.fping.org>
227
229 Exit status is 0 if all the hosts are reachable, 1 if some hosts were
230 unreachable, 2 if any IP addresses were not found, 3 for invalid
231 command line arguments, and 4 for a system call failure.
232
234 If fping was configured with "--enable-safe-limits", the following
235 values are not allowed for non-root users:
236
237 · -i n, where n < 1 msec
238
239 · -p n, where n < 10 msec
240
242 ping(8)
243
244
245
246fping 2020-08-05 FPING(8)