.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "FPING 8" .TH FPING 8 "2017-01-11" "fping" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" fping \- send ICMP ECHO_REQUEST packets to network hosts .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBfping\fR [ \fIoptions\fR ] [ \fIsystems...\fR ] \&\fBfping6\fR [ \fIoptions\fR ] [ \fIsystems...\fR ] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBfping\fR is a program like \fBping\fR which uses the Internet Control Message Protocol (\s-1ICMP\s0) echo request to determine if a target host is responding. \&\fBfping\fR differs from \fBping\fR in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping. Instead of sending to one target until it times out or replies, \fBfping\fR will send out a ping packet and move on to the next target in a round-robin fashion. In the default mode, if a target replies, it is noted and removed from the list of targets to check; if a target does not respond within a certain time limit and/or retry limit it is designated as unreachable. \fBfping\fR also supports sending a specified number of pings to a target, or looping indefinitely (as in \&\fBping\fR ). Unlike \fBping\fR, \fBfping\fR is meant to be used in scripts, so its output is designed to be easy to parse. .PP The binary named \fBfping6\fR is the same as \fBfping\fR, except that it uses IPv6 addresses instead of IPv4. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-a\fR" 5 .IX Item "-a" Show systems that are alive. .IP "\fB\-A\fR" 5 .IX Item "-A" Display targets by address rather than \s-1DNS\s0 name. Combined with \-d, the output will be both the ip and (if available) the hostname. .IP "\fB\-b\fR \fIn\fR" 5 .IX Item "-b n" Number of bytes of ping data to send. The minimum size (normally 12) allows room for the data that \fBfping\fR needs to do its work (sequence number, timestamp). The reported received data size includes the \s-1IP\s0 header (normally 20 bytes) and \s-1ICMP\s0 header (8 bytes), so the minimum total size is 40 bytes. Default is 56, as in \fBping\fR. Maximum is the theoretical maximum \s-1IP\s0 datagram size (64K), though most systems limit this to a smaller, system-dependent number. .IP "\fB\-B\fR \fIn\fR" 5 .IX Item "-B n" Backoff factor. In the default mode, \fBfping\fR sends several requests to a target before giving up, waiting longer for a reply on each successive request. This parameter is the value by which the wait time (\fB\-t\fR) is multiplied on each successive request; it must be entered as a floating-point number (x.y). The default is 1.5. .IP "\fB\-c\fR \fIn\fR" 5 .IX Item "-c n" Number of request packets to send to each target. In this mode, a line is displayed for each received response (this can suppressed with \fB\-q\fR or \fB\-Q\fR). Also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted). .IP "\fB\-C\fR \fIn\fR" 5 .IX Item "-C n" Similar to \fB\-c\fR, but the per-target statistics are displayed in a format designed for automated response-time statistics gathering. For example: .Sp .Vb 2 \& % fping \-C 5 \-q somehost \& somehost : 91.7 37.0 29.2 \- 36.8 .Ve .Sp shows the response time in milliseconds for each of the five requests, with the \&\f(CW\*(C`\-\*(C'\fR indicating that no response was received to the fourth request. .IP "\fB\-d\fR" 5 .IX Item "-d" Use \s-1DNS\s0 to lookup address of return ping packet. This allows you to give fping a list of \s-1IP\s0 addresses as input and print hostnames in the output. .IP "\fB\-D\fR" 5 .IX Item "-D" Add Unix timestamps in front of output lines generated with in looping or counting modes (\fB\-l\fR, \fB\-c\fR, or \fB\-C\fR). .IP "\fB\-e\fR" 5 .IX Item "-e" Show elapsed (round-trip) time of packets. .IP "\fB\-f\fR" 5 .IX Item "-f" Read list of targets from a file. This option can only be used by the root user. Regular users should pipe in the file via stdin: .Sp .Vb 1 \& % fping < targets_file .Ve .IP "\fB\-g\fR \fIaddr/mask\fR" 5 .IX Item "-g addr/mask" Generate a target list from a supplied \s-1IP\s0 netmask, or a starting and ending \s-1IP.\s0 Specify the netmask or start/end in the targets portion of the command line. If a network with netmask is given, the network and broadcast addresses will be excluded. ex. To ping the network 192.168.1.0/24, the specified command line could look like either: .Sp .Vb 1 \& fping \-g 192.168.1.0/24 .Ve .Sp or .Sp .Vb 1 \& fping \-g 192.168.1.1 192.168.1.254 .Ve .IP "\fB\-h\fR" 5 .IX Item "-h" Print usage message. .IP "\fB\-i\fR \fIn\fR" 5 .IX Item "-i n" The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25). .IP "\fB\-l\fR" 5 .IX Item "-l" Loop sending packets to each target indefinitely. Can be interrupted with Ctrl-C; statistics about responses for each target are then displayed. .IP "\fB\-m\fR" 5 .IX Item "-m" Send pings to each of a target host's multiple interfaces. .IP "\fB\-M\fR" 5 .IX Item "-M" Set the \*(L"Don't Fragment\*(R" bit in the \s-1IP\s0 header (used to determine/test the \s-1MTU\s0). .IP "\fB\-n\fR" 5 .IX Item "-n" Same as \-d. .IP "\fB\-N\fR" 5 .IX Item "-N" Format output for netdata (\-l \-Q are required). See: http://my\-netdata.io/ .IP "\fB\-o\fR" 5 .IX Item "-o" Calculate \*(L"outage time\*(R" based on the number of lost pings and the interval used (useful for network convergence tests). .IP "\fB\-O\fR \fIn\fR" 5 .IX Item "-O n" Set the typ of service flag (\s-1TOS\s0). \fIn\fR can be either decimal or hexadecimal (0xh) format. .IP "\fB\-p\fR " 5 .IX Item "-p " In looping or counting modes (\fB\-l\fR, \fB\-c\fR, or \fB\-C\fR), this parameter sets the time in milliseconds that \fBfping\fR waits between successive packets to an individual target. Default is 1000. .IP "\fB\-q\fR" 5 .IX Item "-q" Quiet. Don't show per-probe results, but only the final summary. Also don't show \s-1ICMP\s0 error messages. .IP "\fB\-Q\fR \fIn\fR" 5 .IX Item "-Q n" Like \fB\-q\fR, but show summary results every n seconds. .IP "\fB\-r\fR \fIn\fR" 5 .IX Item "-r n" Retry limit (default 3). This is the number of times an attempt at pinging a target will be made, not including the first try. .IP "\fB\-R\fR" 5 .IX Item "-R" Instead of using all-zeros as the packet data, generate random bytes. Use to defeat, e.g., link data compression. .IP "\fB\-s\fR" 5 .IX Item "-s" Print cumulative statistics upon exit. .IP "\fB\-S\fR \fIaddr\fR" 5 .IX Item "-S addr" Set source address. .IP "\fB\-I\fR \fIif\fR" 5 .IX Item "-I if" Set the interface (requires \s-1SO_BINDTODEVICE\s0 support) .IP "\fB\-t\fR \fIn\fR" 5 .IX Item "-t n" Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that \fBfping\fR waits for a response to its first request. Successive timeouts are multiplied by the backoff factor specified with \fB\-B\fR. Note that this option has no effect looping or counting modes (\fB\-l\fR, \fB\-c\fR, or \&\fB\-C\fR). .IP "\fB\-T\fR \fIn\fR" 5 .IX Item "-T n" Ignored (for compatibility with fping 2.4). .IP "\fB\-u\fR" 5 .IX Item "-u" Show targets that are unreachable. .IP "\fB\-v\fR" 5 .IX Item "-v" Print \fBfping\fR version information. .IP "\fB\-H\fR \fIn\fR" 5 .IX Item "-H n" Set the \s-1IP TTL\s0 field (time to live hops). .SH "EXAMPLES" .IX Header "EXAMPLES" Generate ~1000 pings per second to a host until canceled, printing statistics on the fly at one second intervals, and printing statistics at the end: .PP # fping \-s \-l \-i 1 \-p 1 \-T 1 \-Q 1 127.0.0.1 .PP Note that ping intervals less than 1ms can only be used as root. .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 Roland J. Schemers \s-1III,\s0 Stanford University, concept and versions 1.x .IP "\(bu" 4 \&\s-1RL \s0\*(L"Bob\*(R" Morgan, Stanford University, versions 2.x .IP "\(bu" 4 David Papp, versions 2.3x and up .IP "\(bu" 4 David Schweikert, versions 3.0 and up .PP \&\fBfping website: \fR .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" Exit status is 0 if all the hosts are reachable, 1 if some hosts were unreachable, 2 if any \s-1IP\s0 addresses were not found, 3 for invalid command line arguments, and 4 for a system call failure. .SH "RESTRICTIONS" .IX Header "RESTRICTIONS" If certain options are used (i.e, a low value for \fB\-i\fR and \fB\-t\fR, and a high value for \fB\-r\fR) it is possible to flood the network. This program must be installed as setuid root in order to open up a raw socket, or must be run by root. In order to stop mere mortals from hosing the network, normal users can't specify the following: .IP "\(bu" 4 \&\fB\-i\fR \fIn\fR, where \fIn\fR < 1 msec .IP "\(bu" 4 \&\fB\-r\fR \fIn\fR, where \fIn\fR > 20 .IP "\(bu" 4 \&\fB\-t\fR \fIn\fR, where n < 250 msec .SH "SEE ALSO" .IX Header "SEE ALSO" \&\f(CWping(8)\fR