Chinaunix首页 | 论坛 | 博客
  • 博客访问: 375713
  • 博文数量: 124
  • 博客积分: 2911
  • 博客等级: 少校
  • 技术积分: 1050
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-15 15:57
文章分类

全部博文(124)

文章存档

2012年(6)

2011年(26)

2010年(92)

我的朋友

分类:

2011-06-05 21:07:43

#! /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
阅读(655) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~