FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
fhscripts:fh:fhping.sh.html [2017/12/02 02:49] kurihara |
fhscripts:fh:fhping.sh.html [2019/02/12 23:21] (current) kurihara |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
[[: | [[: | ||
- | ====== fhping.sh | + | ====== |
+ | $FHHOME/ | ||
+ | |||
+ | {{INLINETOC}} | ||
+ | \\ | ||
===== About fhping.sh ===== | ===== About fhping.sh ===== | ||
- | fhping.sh | + | If you want to check connection and ttl, you can use fhping.sh. |
+ | fhping.sh can ping multiple servers. | ||
\\ | \\ | ||
===== How to use ===== | ===== How to use ===== | ||
+ | |||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ fhghost.sh test hosts/test | fhping.sh | + | $ fhghost |
- | 127.0.0.1 is alive | + | $ fhping.sh hosts |
- | 192.168.10.1 is alive | + | |
- | 192.168.10.2 is unreachable | + | |
</ | </ | ||
+ | |||
+ | \\ | ||
+ | == Example Output== | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ fhping.sh test.list | + | ~]$ fhping.sh test.txt |
- | 127.0.0.1 | + | ---------- 192.168.10.1 ping start ---------- |
- | 192.168.10.1 | + | PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. |
- | 192.168.10.2 | + | 64 bytes from 192.168.10.1: |
+ | 64 bytes from 192.168.10.1: | ||
+ | |||
+ | --- 192.168.10.1 ping statistics --- | ||
+ | 2 packets transmitted, | ||
+ | rtt min/ | ||
+ | ---------- 192.168.10.2 ping start ---------- | ||
+ | PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data. | ||
+ | From 192.168.10.1 | ||
+ | From 192.168.10.1 icmp_seq=2 Destination Host Unreachable | ||
+ | |||
+ | --- 192.168.10.2 ping statistics --- | ||
+ | 2 packets transmitted, | ||
+ | pipe 2 | ||
+ | ####################################### | ||
+ | ## NG : ping 192.168.10.2 | ||
+ | ####################################### | ||
+ | ---------- 127.0.0.1 ping start ---------- | ||
+ | PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. | ||
+ | 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.094 ms | ||
+ | 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.023 ms | ||
+ | |||
+ | --- 127.0.0.1 ping statistics --- | ||
+ | 2 packets transmitted, | ||
+ | rtt min/ | ||
</ | </ | ||
\\ | \\ | ||
===== fhping.sh ===== | ===== fhping.sh ===== | ||
+ | |||
+ | $FHHOME/ | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
Line 33: | Line 66: | ||
# How to use | # How to use | ||
# | # | ||
- | # echo 192.168.0.10 | fhping.sh | + | # |
- | # | + | |
# | # | ||
- | if [ -z "$1" ] ; then | + | for i in `cat $1 |grep -Ev " |
- | | + | do |
- | else | + | echo " |
- | | + | ping -i 0.5 -c 2 $i |
- | fi | + | |
+ | echo "#### NG : ping $i ####" | ||
+ | fi | ||
+ | done | ||
+ | exit | ||
</ | </ | ||
+ | |||
+ | |||
Line 49: | Line 87: | ||
\\ | \\ | ||
<WRAP box 90%> | <WRAP box 90%> | ||
- | <catlist -noAddPageButton -smallHead -sortAscending> | + | < |
</ | </ | ||
\\ | \\ | ||
\\ | \\ | ||
[[: | [[: |
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.