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:48] kurihara [fhping.sh] |
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 ===== | ||
+ | If you want to check connection and ttl, you can use fhping.sh. | ||
+ | fhping.sh can ping multiple servers. | ||
\\ | \\ | ||
- | ===== Operation | + | ===== How to use ===== |
<sxh bash toolbar: | <sxh bash toolbar: | ||
$ fhghost | $ fhghost | ||
+ | $ fhping.sh hosts | ||
</ | </ | ||
+ | |||
\\ | \\ | ||
- | ====== fhping.sh ====== | + | == Example Output== |
+ | <sxh bash toolbar: | ||
+ | ~]$ fhping.sh | ||
+ | ---------- 192.168.10.1 ping start ---------- | ||
+ | PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. | ||
+ | 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 icmp_seq=1 Destination Host Unreachable | ||
+ | From 192.168.10.1 icmp_seq=2 Destination Host Unreachable | ||
- | ===== How to use ===== | + | --- 192.168.10.2 ping statistics --- |
- | <sxh bash toolbar:false gutter: | + | 2 packets transmitted, |
- | $ fhghost.sh test hosts/test | fhping.sh | + | pipe 2 |
- | 127.0.0.1 | + | ####################################### |
- | 192.168.10.1 is alive | + | ## NG : ping 192.168.10.2 |
- | 192.168.10.2 is unreachable | + | ####################################### |
- | </ | + | ---------- 127.0.0.1 ping start ---------- |
+ | PING 127.0.0.1 | ||
+ | 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 | ||
- | <sxh bash toolbar: | + | --- 127.0.0.1 |
- | $ fhping.sh test.list | + | 2 packets transmitted, |
- | 127.0.0.1 | + | rtt min/ |
- | 192.168.10.1 is alive | + | |
- | 192.168.10.2 is unreachable | + | |
</ | </ | ||
+ | \\ | ||
===== fhping.sh ===== | ===== fhping.sh ===== | ||
+ | |||
+ | $FHHOME/ | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
Line 42: | 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 58: | 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.