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/11/20 01:14] 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 ===== | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | == Example Output== | ||
+ | <sxh bash toolbar: | ||
+ | ~]$ fhping.sh test.txt | ||
+ | ---------- 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 | ||
+ | |||
+ | --- 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: | ||
#!/bin/bash | #!/bin/bash | ||
Line 22: | Line 65: | ||
# | # | ||
# How to use | # How to use | ||
- | # $ fhghost | + | # |
+ | # | ||
# | # | ||
- | |||
- | LIST=$1 | ||
- | |||
for i in `cat $1 |grep -Ev " | for i in `cat $1 |grep -Ev " | ||
Line 33: | Line 74: | ||
ping -i 0.5 -c 2 $i | ping -i 0.5 -c 2 $i | ||
if [ " | if [ " | ||
- | echo "#### ping ERROR $i ####" | + | echo "#### |
fi | fi | ||
done | done | ||
Line 39: | Line 80: | ||
exit | exit | ||
</ | </ | ||
+ | |||
+ | |||
Line 44: | 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.