FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

fhscripts:fh:fhfping.sh.html



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



fhscripts/fh/fhfping.sh.html.txt ยท Last modified: 2018/03/29 00:03 by kurihara