逻辑闪断 就是隔一定时间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=$3
log()
{
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 $opne