Quantcast
Channel: cyberfellabtc
Viewing all articles
Browse latest Browse all 92

Ping a list of hosts

$
0
0

The following shell script automates a ping test across a list of hosts.  The format of the expected host-list file is…

<hostname1> <ipaddress1>

<hostname2> <ipaddress2>

<hostname3> <ipaddress3>

…etc

You can easily tailor the script to suit your list if you only have  a list of hostnames or ip addresses.

The hosts that respond are logged to a file, ping_log.

Note that the script was written in Bash on a Red Hat Linux server, and the syntax may differ from a fully POSIX compliant script written in Ksh on HPUX, where variables are encapsulated in {} brackets and tests are double [[ ]] bracketed.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

The post Ping a list of hosts appeared first on Cyberfella Ltd.


Viewing all articles
Browse latest Browse all 92

Trending Articles