first commit
This commit is contained in:
17
scripts/test_scripts/uptime_vm.sh
Normal file
17
scripts/test_scripts/uptime_vm.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
HOSTS=(host1
|
||||
host2
|
||||
)
|
||||
|
||||
uptime_mv ()
|
||||
{
|
||||
for host in "${HOSTS[@]}" ;
|
||||
do
|
||||
ssh -o ConnectTimeout=3 -o ConnectionAttempts=1 -n root@$host "uptime" >> uptime_$host.log
|
||||
done
|
||||
}
|
||||
|
||||
while true ;do
|
||||
uptime_mv ;
|
||||
sleep 5
|
||||
done > /dev/null 2>&1
|
Reference in New Issue
Block a user