first commit
This commit is contained in:
14
scripts/test_scripts/log_ping_between.sh
Normal file
14
scripts/test_scripts/log_ping_between.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
FROM_SERVER=$1
|
||||
TO_SERVER=$2
|
||||
LOG_FILE="ping_${FROM_SERVER}_to_${TO_SERVER}.log"
|
||||
|
||||
for (( ; ; ))
|
||||
do
|
||||
date >> $LOG_FILE
|
||||
ssh -o ConnectTimeout=1 -o ConnectionAttempts=1 \
|
||||
${FROM_SERVER} ping ${TO_SERVER} | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' >> $LOG_FILE
|
||||
echo "Disconnected from server..." >> $LOG_FILE
|
||||
sleep 10
|
||||
done
|
Reference in New Issue
Block a user