components/fping/fping.1m
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 205 777251fa3676
child 5789 5183fa4a46ce
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
205
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
'\" te
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
.\"
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
.\"  
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
.TH fping 1M "29 Feb 2008" "SunOS 5.11" "System Administration Commands"
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
.SH NAME
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
fping \- send ICMP ECHO_REQUEST packets to network hosts
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
.SH SYNOPSIS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
.B fping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
[ \fIoptions\fR ]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
[ \fIsystems...\fR ]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
.SH DESCRIPTION
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
.NXR "fping command"
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
.NXR "ICMP ECHO_REQUEST"
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
      
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
is a 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
.B ping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
like program which uses the Internet Control
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
Message Protocol (ICMP) echo request to determine if a target host is
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
responding. 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
differs from ping in that you can specify any
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
number of targets on the command line, or specify a file containing
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
the lists of targets to ping. Instead of sending to one target until it
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
times out or replies, 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
will send out a ping packet and move
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
on to the next target in a round-robin fashion. 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
.PP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
In the default mode, if a target replies,
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
it is noted and removed from the list of targets to check; if a target
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
does not respond within a certain time limit and/or retry limit it 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
is designated as unreachable.  
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
also supports sending a specified number of pings to a target, or
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    38
looping indefinitely (as in 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    39
.B ping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    40
).
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    41
.PP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    42
Unlike 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    43
.B ping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    44
,
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    45
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    46
is meant to be used in scripts, so its output is designed to be 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    47
easy to parse.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    48
.SH OPTIONS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
.IP \fB-a\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    50
Show systems that are alive.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    51
.IP \fB-A\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    52
Display targets by address rather than DNS name.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    53
.IP \fB-b\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    54
Number of bytes of ping data to send.  The minimum size (normally 12)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    55
allows room for the data that 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    56
.B fping 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    57
needs to do its work (sequence number, timestamp).  The reported
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    58
received data size includes the IP header (normally 20 bytes) and ICMP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    59
header (8 bytes), so the minimum total size is 40 bytes.  Default is
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    60
56, as in 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
.B ping.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    62
Maximum is the theoretical maximum IP datagram size (64K), though most
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    63
systems limit this to a smaller, system-dependent number.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    64
.IP \fB-B\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    65
In the default mode,
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    66
.B fping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    67
sends several requests to a target before giving up, waiting longer for
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    68
a reply on each successive request.  This parameter is the value by
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    69
which the wait time is multiplied on each successive request; it must
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    70
be entered as a floating-point number (x.y).  The default is 1.5.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    71
.IP \fB-c\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    72
Number of request packets to send to each target.  In this mode, a
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    73
line is displayed for each received response (this can suppressed with
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    74
-q or -Q).  Also, statistics about responses for each target are displayed
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    75
when all requests have been sent (or when interrupted).
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    76
.IP \fB-C\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    77
Similar to -c, but the per-target statistics are displayed in a format
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    78
designed for automated response-time statistics gathering.  For
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    79
example:
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    80
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    81
% fping -C 5 -q somehost
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    82
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    83
somehost : 91.7 37.0 29.2 - 36.8
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    84
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    85
shows the response time in milliseconds for each of the five requests,
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    86
with the "-" indicating that no response was received to the fourth
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    87
request.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    88
.IP \fB-d\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    89
Use gethostbyaddr(3NSL) to lookup address of return ping packet. This allows you to give
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    90
fping a list of IP addresses as input and print hostnames in the output.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    91
.IP \fB-e\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    92
Show elapsed (round-trip) time of packets.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    93
.IP \fB-f\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    94
Read list of targets from a file.  
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    95
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    96
% fping < targets_file
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    97
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    98
.IP \fB-g\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    99
Generate a target list from a supplied IP netmask, or a starting and ending IP.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   100
Specify the netmask or start/end in the targets portion of the command line.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   101
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   102
ex. To ping the class C 192.168.1.x, the specified command line could look like either:
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   103
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   104
fping -g 192.168.1.0/24
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   105
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   106
or
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   107
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   108
fping -g 192.168.1.0 192.168.1.255
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   109
.IP \fB-h\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   110
Print usage message.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   111
.IP \fB-i\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   112
The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25).
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   113
.IP \fB-l\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   114
Loop sending packets to each target indefinitely.  Can be interrupted
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   115
with ctl-C; statistics about responses for each target are then displayed.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   116
.IP \fB-m\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   117
Send pings to each of a target host's multiple interfaces.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   118
.IP \fB-n\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   119
Same as -d.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   120
.IP \fB-p\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   121
In looping or counting modes (-l, -c, or -C), this parameter sets the
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   122
time in milliseconds that
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   123
.B fping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   124
waits between successive packets to an individual target.  Default is
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   125
1000.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   126
.IP \fB-q\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   127
Quiet. Don't show per-target results, just set final exit status.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   128
.IP \fB-Q\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   129
Like -q, but show summary results every n seconds.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   130
.IP \fB-r\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   131
Retry limit (default 3). This is the number of times an attempt at pinging
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   132
a target will be made, not including the first try.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   133
.IP \fB-s\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   134
Print cumulative statistics upon exit.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   135
.IP \fB-t\fIn\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   136
Initial target timeout in milliseconds (default 500). In the default
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   137
mode, this is the amount of time that 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   138
.B fping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   139
waits for a response to its first request.  Successive timeouts are
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   140
multiplied by the backoff factor.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   141
.IP \fB-u\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   142
Show targets that are unreachable.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   143
.IP \fB-v\fR 5
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   144
Print 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   145
.B fping
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   146
version information.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   147
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   148
.SH EXAMPLES
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   149
The following perl script will check a list of hosts and send mail if
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   150
any are unreachable. It uses the open2 function which allows a program
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   151
to be opened for reading and writing. fping does not start pinging the
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   152
list of systems until it reads EOF, which it gets after INPUT is closed. 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   153
Sure the open2 usage is not needed in this example, but it's a good open2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   154
example none the less. 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   155
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   156
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   157
#!/usr/local/bin/perl
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   158
require 'open2.pl';
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   159
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   160
$MAILTO = "root";
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   161
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   162
$pid = &open2("OUTPUT","INPUT","/usr/local/bin/fping -u");
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   163
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   164
@check=("slapshot","foo","foobar");
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   165
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   166
foreach(@check) {  print INPUT "$_\\n"; }
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   167
close(INPUT);
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   168
@output=<OUTPUT>;
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   169
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   170
if ($#output != -1) {
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   171
 chop($date=`date`);
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   172
 open(MAIL,"|mail -s 'unreachable systems' $MAILTO");
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   173
 print MAIL "\\nThe following systems are unreachable as of: $date\\n\\n";
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   174
 print MAIL @output;
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   175
 close MAIL;
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   176
}
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   177
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   178
.ni
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   179
Another good example is when you want to perform an action only on hosts
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   180
that are currently reachable.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   181
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   182
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   183
#!/usr/local/bin/perl
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   184
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   185
$hosts_to_backup = `cat /etc/hosts.backup | fping -a`;
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   186
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   187
foreach $host (split(/\\n/,$hosts_to_backup)) {
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   188
  # do it
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   189
}
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   190
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   191
.ni
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   192
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   193
The following is an output example: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   194
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   195
\fB% fping a.b.com x.y.z.net 192.168.0.1 192.168.0.3\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   196
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   197
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   198
a.b.com is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   199
x.y.z.net is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   200
192.168.0.1 is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   201
192.168.0.3 is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   202
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   203
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   204
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   205
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   206
The following is an output example using the '-a' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   207
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   208
\fB% fping -a a.b.com x.y.z.net 192.168.0.1 192.168.0.3\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   209
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   210
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   211
a.b.com
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   212
x.y.z.net
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   213
192.168.0.1
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   214
192.168.0.3
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   215
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   216
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   217
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   218
The following is an output example using the '-c' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   219
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   220
\fb% fping -c 3 a.b.com x.y.z.net 192.168.0.1\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   221
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   222
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   223
a.b.com		: [0], 84 bytes, 51.1 ms (51.1 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   224
192.168.0.1	: [0], 84 bytes, 0.08 ms (0.08 avg, 0% loss) [<- 192.168.0.4]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   225
x.y.z.net 	: [0], 84 bytes, 70.6 ms (70.6 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   226
a.b.com		: [1], 84 bytes, 60.9 ms (56.0 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   227
192.168.0.1	: [1], 84 bytes, 0.09 ms (0.08 avg, 0% loss) [<- 192.168.0.4]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   228
a.b.com		: [2], 84 bytes, 40.6 ms (50.9 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   229
192.168.0.1	: [2], 84 bytes, 0.11 ms (0.09 avg, 0% loss) [<- 192.168.0.4]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   230
x.y.z.net		: [2], 84 bytes, 68.8 ms (69.7 avg, 33% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   231
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   232
a.b.com		: xmt/rcv/%loss = 3/3/0%, min/avg/max = 40.6/50.9/60.9
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   233
x.y.z.net		: xmt/rcv/%loss = 3/2/33%, min/avg/max = 68.8/69.7/70.6
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   234
192.168.0.1	: xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.08/0.09/0.11
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   235
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   236
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   237
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   238
The following is an output example using the '-C' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   239
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   240
\fb% fping -C 3 a.b.com x.y.z.net 192.168.0.1\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   241
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   242
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   243
a.b.com		: [0], 84 bytes, 41.7 ms (41.7 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   244
x.y.z.net		: [0], 84 bytes, 66.6 ms (66.6 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   245
a.b.com		: [1], 84 bytes, 50.7 ms (46.2 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   246
x.y.z.net		: [1], 84 bytes, 62.6 ms (64.6 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   247
a.b.com		: [2], 84 bytes, 44.9 ms (45.8 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   248
x.y.z.net		: [2], 84 bytes, 69.5 ms (66.2 avg, 0% loss)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   249
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   250
a.b.com		: 41.74 50.72 44.94
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   251
x.y.z.net		: 66.69 62.63 69.52
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   252
192.168.0.1	: - - -
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   253
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   254
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   255
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   256
The following is an output example using the '-e' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   257
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   258
\fb% fping -e a.b.com x.y.z.net 192.168.0.1\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   259
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   260
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   261
a.b.com is alive (18.9 ms)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   262
x.y.z.net is alive (9.51 ms)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   263
192.168.0.1 is alive (0.35 ms)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   264
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   265
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   266
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   267
The following is an output example using the '-g' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   268
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   269
\fb% fping -g 192.168.0.1 192.168.0.6\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   270
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   271
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   272
192.168.0.0 is alive [<- 192.168.0.4]
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   273
192.168.0.4 is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   274
192.168.0.1 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   275
192.168.0.2 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   276
192.168.0.3 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   277
192.168.0.5 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   278
192.168.0.6 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   279
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   280
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   281
.LP
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   282
The following is an output example using the '-s' option: 
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   283
.sp
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   284
\fb% fping -s a.b.com x.y.z.net 192.168.0.1\fR
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   285
.in +2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   286
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   287
a.b.com is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   288
x.y.z.net is alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   289
192.168.0.1 is unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   290
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   291
       3 targets
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   292
       2 alive
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   293
       1 unreachable
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   294
       0 unknown addresses
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   295
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   296
       4 timeouts (waiting for response)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   297
       6 ICMP Echos sent
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   298
       2 ICMP Echo Replies received
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   299
       0 other ICMP received
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   300
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   301
 46.1 ms (min round trip time)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   302
 58.7 ms (avg round trip time)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   303
 71.3 ms (max round trip time)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   304
        4.153 sec (elapsed real time)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   305
.fi
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   306
.in -2
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   307
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   308
.SH AUTHORS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   309
.nf
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   310
Roland J. Schemers III, Stanford University, concept and versions 1.x
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   311
RL "Bob" Morgan, Stanford University, versions 2.x
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   312
ZeroHype Technologies Inc. (http://www.zerohype.com), versions 2.3x and up,
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   313
fping website:  http://www.fping.com
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   314
.ni
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   315
.SH DIAGNOSTICS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   316
Exit status is 0 if all the hosts are reachable, 1 if some hosts were
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   317
unreachable, 2 if any IP addresses were not found, 3 for invalid
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   318
command line arguments, and 4 for a system call failure.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   319
.SH BUGS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   320
Ha! If we knew of any we would have fixed them!
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   321
.SH RESTRICTIONS
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   322
Successful execution of this program requires that it be granted
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   323
the net_icmpaccess privilege.
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   324
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   325
.ni
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   326
.SH SEE ALSO
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   327
netstat(1M), ping(1M), ifconfig(1M), rbac(5), privileges(5)
777251fa3676 7039717 move fping to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
   328