Compare commits
1 Commits
twoCluster
...
master
Author | SHA1 | Date | |
---|---|---|---|
03bb249940 |
@ -5,25 +5,22 @@ while [ true ]
|
|||||||
do
|
do
|
||||||
echo "$lastping"
|
echo "$lastping"
|
||||||
# Edit this setting to your server ip
|
# Edit this setting to your server ip
|
||||||
ping -c 1 192.168.178.10
|
ping -c 1 192.168.178.7
|
||||||
lastping="$?"
|
lastping1="$?"
|
||||||
|
ping -c 1 192.168.178.8
|
||||||
|
lastping2="$?"
|
||||||
|
ping -c 1 192.168.178.3
|
||||||
|
lastping3="$?"
|
||||||
|
|
||||||
|
nodesonline=$((4-$lastping1-$lastping2-$lastping3))
|
||||||
|
|
||||||
|
|
||||||
if [ "$lastcond" != "$lastping" ]
|
if [ "$lastcond" != "$nodesonline" ]
|
||||||
then
|
then
|
||||||
if [ $lastping = 0 ]
|
pvecm expected $nodesonline
|
||||||
then
|
lastcond=$nodesonline
|
||||||
pvecm expected 2
|
|
||||||
lastcond="0"
|
|
||||||
else
|
|
||||||
pvecm expected 1
|
|
||||||
lastcond="1"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#echo $nodesonline
|
||||||
|
|
||||||
echo "$lastping"
|
|
||||||
echo "$lastcond"
|
|
||||||
sleep 15
|
sleep 15
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user