first commit
This commit is contained in:
18
scripts/test_scripts/ping_test.sh
Normal file
18
scripts/test_scripts/ping_test.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
HOSTS=(host1
|
||||
host2
|
||||
)
|
||||
|
||||
uptime_mv ()
|
||||
{
|
||||
for host in "${HOSTS[@]}" ;
|
||||
do
|
||||
PONG=$(ping -c 1 $host)
|
||||
echo "$(date) $PONG" >> ping_$host.log &
|
||||
done
|
||||
}
|
||||
|
||||
while true ;do
|
||||
uptime_mv ;
|
||||
sleep 1
|
||||
done
|
Reference in New Issue
Block a user