Table of Contents

FastHandle Scripts

script for fping multiple servers

$FHHOME/bin/fhfping.sh


About fhfping.sh

fhfping.sh is a fast fping check script.


How to use

$ fhghost.sh test hosts/test | fhfping.sh
127.0.0.1 is alive
192.168.10.1 is alive
192.168.10.2 is unreachable

$ fhfping.sh test.list
127.0.0.1 is alive
192.168.10.1 is alive
192.168.10.2 is unreachable


fhfping.sh

$FHHOME/bin/fhfping.sh

#!/bin/bash
#================================================
# fhfping.sh
#
# How to use
#     fhghost  "*"  hosts/test | fhfping.sh
#     echo 192.168.0.10 | fhfping.sh
#     fhfping.sh  test.list
#================================================

if [ -z "$1" ] ; then
    grep -Ev "^#|^$" |awk {'print $1'} |fping -t 250 2>/dev/null
else
    cat "$1" |grep -Ev "^#|^$" |awk {'print $1'} |fping -t 250 2>/dev/null
fi




fhscripts





FastHandle Scripts