您现在的位置是:主页 > news > 苹果id美国地址生成器/seo推广外包
苹果id美国地址生成器/seo推广外包
admin2025/6/4 2:09:12【news】
简介苹果id美国地址生成器,seo推广外包,徐州网站建设多少钱,网站 实施逻辑闪断 就是隔一定时间down网卡然后重启 如果需要长时间模拟此类测试则需要借助shell脚本,以下是我随便写的 有需要欢迎修改使用 #!/bin/bash ############################################################# # this script for disk operate with reliabili…
苹果id美国地址生成器,seo推广外包,徐州网站建设多少钱,网站 实施逻辑闪断 就是隔一定时间down网卡然后重启
如果需要长时间模拟此类测试则需要借助shell脚本,以下是我随便写的 有需要欢迎修改使用
#!/bin/bash
#############################################################
# this script for disk operate with reliabili…
逻辑闪断 就是隔一定时间down网卡然后重启
如果需要长时间模拟此类测试则需要借助shell脚本,以下是我随便写的 有需要欢迎修改使用
#!/bin/bash
#############################################################
# this script for disk operate with reliability testing
# eg. ./net_stop.sh stoptime sleeptime(unit 's')
# usage: ./net_stop.sh 200 300
# update: 2019-3-6 pansaky
#############################################################
host_name=`hostname`
cluster_stat=`ceph -s | grep health |awk '{print $2}'`
#now='`date "+%Y-%m-%d %H:%M:%S"`'
log_file="./net_operate.log"
stoptime=$1
sleeptime=$2
opnet=$3log()
{
local level=$1
local msg=$2
echo "[`date "+%Y-%m-%d %H:%M:%S"`] = $level = : $msg" >> $log_file
}net_op()
{
#net_stat=`ifconfig| grep p3p1 | awk -F ':' '{print $1}'`
if [ -z $opnet ];thenlocal opnet="p3p1"
fi
net_stat=`ifconfig| grep $opnet | awk -F ':' '{print $1}'`for((i=0;i<4;i++));dolog INFO "do down $opnet operation!"sudo ifdown $opnetif [ $? -eq 0 ];thenlog INFO "down $opnet successful"sleep $stoptimeelselog ERROR "down $opnet failed! retry..."sudo ifdown $opnetfilog INFO "do up $opnet operation!"sudo ifup $opnetif [ $? -eq 0 ];thenlog INFO "up $opnet successful"sleep $sleeptimeelselog ERROR "up $opnet failed! retry..."sudo ifup $opnetfidone
}main()
{
if [ -z $stoptime -o -z $sleeptime ];thenlog ERROR "error args have input! \$stoptime is: $1, \$sleeptime is: $2 "echo "wrong input! use like this: ./net_stop.sh 20 20"exit 1
fi
echo "stat net test at ===`date "+%Y-%m-%d %H:%M:%S"`===!" > $log_file
it=0
while(( $it<=1000));donet_opsleep 10let "it++"log INFO "$it times has done!"
done
}main