Sunday, October 17, 2010

FPing: Options & Tuning

FPing: Options & Tuning


The FPing command offers substantial capability in polling multiple devices by polling asyncronously. FPing is projected to be bundled with Solaris 11, a worthy tool to be added to the Solaris toolkit. There are a lot of command line options, which various manual pages & elp files hold incomplete or conflicting information. This document is an attempt to clarify the options.

FPing Version:

The following illustrates the version of "fping" which this commentary is used for:

sunt2000$ fping -v
fping: Version 2.4b2_to $Date: 2001/01/25 11:25:04 $
fping: comments to

This version is currently installed via an SVR4 package from sunfreeware and can be downloaded under Solaris 10 here.

Issues Experienced:

A combination of selected command line arguments, total number of devices, and delay in the response from the devices can occasionally cause a crash of "fping" with the error "Arithmetic Exception".

The individual maintaining the fping source code has not been responsive to requests for clarifications regarding the package he has been maintaining regarding various crashes which have been experienced with the package. After working on the crash issue for several weeks, it became necessary to clarify the command line options and publish a short blog on the experience.

Command Line Options:

The command line options below were taken from the manual page for the Solaris packaged distribution and augmented with additional comments. Small fonts in parenthesis are original manual page entries, italics represent augmented description.

fping [ options ] [ systems... ]

-a Show systems that are alive.

-A Display targets by address rather than (DNS name) operating system name resolution.

-b n Number of bytes of ping data to send. The minimum size (normally 12) allows room for the data that fping needs to do its work (sequence number, timestamp). The reported received data size includes the IP header (normally 20 bytes) and ICMP header (8 bytes), so the minimum total size is 40 bytes. Default is 56, as in ping. Maximum is the theoretical maximum IP datagram size (64K), though most systems limit this to a smaller, system-dependent number.

-B n In the default mode, fping 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 is multiplied on each successive request; it must be entered as a floating-point number (x.y). This is referred to as an Exponential Backoff Factor. The default is 1.5.

-c Number of request packets to send to each target. In this mode, a line is displayed for each received response (this can suppressed with -q or -Q). Also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted). The default of 1.

-C Similar to -c, but the per-target statistics are displayed in a format designed for automated response-time statistics gathering. The output display is also called Verbose Mode. For example:
% fping -C 5 -q somehost
somehost : 91.7 37.0 29.2 - 36.8
shows the response time in milliseconds for each of the five requests, with the "-" indicating that no response was received to the fourth request.

-d Use (DNS to lookup) operating system name resolution lookup on address of return ping packet. This allows you to give fping a list of IP addresses as input and print hostnames in the output.

-e Show elapsed (round-trip) time of packets.

-f file Read list of targets from a file. This option can only be used by the root user. Not used when -g is not specified. Regular users should pipe in the file via stdin:
% fping <>-g Generate a target list from a supplied IP netmask, or a starting and ending IP. Specify the netmask or start/end in the targets portion of the command line.
ex. To ping the class C 192.168.1.x, the specified command line could look like either:
fping -g
fping -g

-h Print usage message.

-i n The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25). This is the icmp packet sending interval. The poller will move linearly through the list of provided hosts or ip addresses, waiting this interval after sending a packet before sending a packet to the next host or ip in the list. For large quantity of nodes, this number may need to be reduced to avoid a crash with an "Arithmetic Exception" error. Some networks may drop packets if this is set too low. Maintainer web site manual page specifies the default value is 10. If this value is critical for your implementation, specify it.

-l Loop sending packets to each target indefinitely. Can be interrupted with ctl-C; statistics about responses for each target are then displayed. May not die in looping mode if process reading STDOUT is closed abnormally.

-m Send pings to each of a target host's multiple interfaces.

-n Show target by operating system resolved name. Same as -d.

-p n In looping or counting modes (-l, -c, or -C), this parameter sets the time in milliseconds that fping waits between successive packets to an individual target. Useful in unreliable networks for spreading retry a distance from former attempt. For large quantity of nodes, increasing this number may help reduce instances of a crash with an "Arithmetic Exception" error. Default is 1000.

-q Quiet. Don't show per-target results, just set final exit status.

-Q n Like -q, but show summary results every n seconds. If this summary happens before all the devices can be polled, an "Arithmetic Exception" error may occur. This value may need to be increased, to aleviate this crashing symptom.

-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.

-s Print cumulative statistics upon exit.

-t n Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that fping waits for a response to its first request. Successive timeouts are multiplied by the backoff factor.

-u Show targets that are unreachable.

-v Print fping version information.

No comments:

Post a Comment