Bug 105678 - ping's exit code could be more useful
Summary: ping's exit code could be more useful
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: iputils   
(Show other bugs)
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Mike McLean
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-26 14:46 UTC by Adam Spiers
Modified: 2015-03-05 01:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-22 13:17:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Adam Spiers 2003-09-26 14:46:04 UTC
If you specify both -c and -w switches, and the exit
code is 1, you don't know whether the host is alive
or not just by the exit code, since either no reply
packets have been received, or some reply packets *were*
recieved but the program timed out before the *full*
quota of packets expected in the -c value were received
(e.g. with -c 5 any number of replies between 1 and 4
would result in an exit code of 1).

That means that you have to look at STDOUT to determine
whether a host was alive, which makes scripting etc.
a lot more awkward.

Comment 1 Phil Knirsch 2004-04-22 13:17:57 UTC
Why don't you use -c 1 -W 10 for example then? This should do what you
want as if it fails then the host was not reachable, otherwise it was

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.