#! /bin/sh
#Function: Show the HA taking over Effects of TUXEDO
CLTHOME=/home/tuxedo/simpapp
. $CLTHOME/simpvar
WSNADDR=//192.168.0.100:7110;export WSNADDR
count=0
old=0
now=0
flag=0
during_time=0
if [ $# -lt 1 ];then
echo "Usage:{+\"string\"}"
else
while :
do
result=`$CLTHOME/wsimpcl "$1"`
if [ -n "$result" ]; then
now=1
else
now=0
fi
let tmp=$now-$old
old=$now
case $tmp in
-1)
flag=1
timer_begin=`date +%s`
echo $timer_begin
;;
1)
if [ $flag -eq 1 ];then
let during_time=`date +%s`-$timer_begin
fi
;;
*);;
esac
count=$(($count+1))
echo "$count $result"
echo "Last_No_Response_Duration:$during_time"
echo ""
sleep 1
done
fi
阅读(699) | 评论(0) | 转发(0) |