IsHostAlive.sh is a Bourne Shell script that helps you determine whether a network host is on and responding to network pings. This script will return 1 or 0, which represents true and false respectively. This script returns true when the host responds.
Because this script uses the ping command to determine whether a host is on, it usually returns a result immediately when the host responds. However, if the host is off, it could take up to a second before this script times out and return 'false'.
IsHostAlive.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.
$ IsHostAlive.sh www.google.com
The IsHostAlive.sh script was originally written on Mac OS X's Darwin UNIX shell. It uses the ping utility. However, the output of the ping utility on Darwin differs slightly from the Ubuntu Linux distribution. Therefore, I have modified the script slightly so that it would work on most flavors of UNIX and Linux operating systems. The newer version is attached below.
It seems that the previous version of "IsHostAlive.sh" were looking for an unreliable regular expression, causing it to report that dead hosts are alive. I have fixed the bug in the version attached below.
I found more differences between Darwin and Linux. The timeout flag for ping are different on the two different platforms. So I have made changes to support both platforms. The new version is attached below.
Darwin on Mountain Lion is once again slightly different than its predecessor, causing "IsHostAlive.sh" to fail. I've updated "IsHostAlive.sh" with the difference, so that it should work on all Darwin and Linux alike. The new version is attached below.
Did your message disappear? Read the Forums FAQ.
TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.
Title: Ubuntu 14.04 LTS - Wireless Network Stops Working Periodically
Spam Control | * indicates required field
Messages, files, and images copyright by respective owners.
40 Users Online
Copyright © 1996 - 2018. All Rights Reserved.