diff --git a/01.stress_script/inband_ac_cycle.sh b/01.stress_script/inband_ac_cycle.sh index 447012d..24ca0e7 100644 --- a/01.stress_script/inband_ac_cycle.sh +++ b/01.stress_script/inband_ac_cycle.sh @@ -36,11 +36,11 @@ pre_check(){ if [ -f $LOCAL_CNT_FILE ];then echo "Local cnt file exist ..." >> /dev/null else - echo "Local cnt file doesn't exist, so creat it ..." | tee $LOG_FILE + echo "Local cnt file doesn't exist, so creat it ..." echo 1 > $LOCAL_CNT_FILE fi - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something @@ -51,7 +51,7 @@ start_ac_cycle(){ local_cnt=`cat $LOCAL_CNT_FILE` if [ $local_cnt -le $aim_cnt ];then - echo "Index $local_cnt : will execute machine AC cycle" | tee $LOG_FILE + echo "Index $local_cnt : will execute machine AC cycle" local_cnt=$(($local_cnt+1)) echo $local_cnt > $LOCAL_CNT_FILE diff --git a/01.stress_script/inband_dc_cycle.sh b/01.stress_script/inband_dc_cycle.sh index c58b839..0d86c95 100644 --- a/01.stress_script/inband_dc_cycle.sh +++ b/01.stress_script/inband_dc_cycle.sh @@ -36,11 +36,11 @@ pre_check(){ if [ -f $LOCAL_CNT_FILE ];then echo "Local cnt file exist ..." >> /dev/null else - echo "Local cnt file doesn't exist, so creat it ..." | tee $LOG_FILE + echo "Local cnt file doesn't exist, so creat it ..." echo 1 > $LOCAL_CNT_FILE fi - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something @@ -51,7 +51,7 @@ start_dc_cycle(){ local_cnt=`cat $LOCAL_CNT_FILE` if [ $local_cnt -le $aim_cnt ];then - echo "Index $local_cnt : will execute power cycle" | tee $LOG_FILE + echo "Index $local_cnt : will execute power cycle" local_cnt=$(($local_cnt+1)) echo $local_cnt > $LOCAL_CNT_FILE diff --git a/01.stress_script/inband_stress_update.sh b/01.stress_script/inband_stress_update.sh index de9e95b..01f5919 100644 --- a/01.stress_script/inband_stress_update.sh +++ b/01.stress_script/inband_stress_update.sh @@ -36,12 +36,12 @@ print_usage(){ pre_check(){ # check if local cnt file exist - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something - ipmitool mc info | tee $LOG_FILE + ipmitool mc info if [ $? -ne 0 ];then - echo ">>> BMC Die, script terminated ..." | tee $LOG_FILE + echo ">>> BMC Die, script terminated ..." exit 0 fi } @@ -52,7 +52,7 @@ start_stress_update(){ while true do cnt=$(($cnt+1)) - echo ">>> start test index $cnt" | tee $LOG_FILE + echo ">>> start test index $cnt" pre_check @@ -62,16 +62,16 @@ start_stress_update(){ else use_image=$image1 fi - echo ">>> Use Image : $use_image" | tee $LOG_FILE + echo ">>> Use Image : $use_image" # start update - $YAFU -cd $use_image -pc | tee $LOG_FILE - echo ">>> End of update , start sleep 600s ..." | tee $LOG_FILE + $YAFU -cd $use_image -pc + echo ">>> End of update , start sleep 600s ..." if [ $cnt -le $aim_cnt ];then sleep $sleep_time else - echo ">>> Complete stress update, Exit ..." | tee $LOG_FILE + echo ">>> Complete stress update, Exit ..." break fi done diff --git a/01.stress_script/os_reboot.sh b/01.stress_script/os_reboot.sh index 43bec56..f1e86b0 100644 --- a/01.stress_script/os_reboot.sh +++ b/01.stress_script/os_reboot.sh @@ -36,11 +36,11 @@ pre_check(){ if [ -f $LOCAL_CNT_FILE ];then echo "Local cnt file exist ..." >> /dev/null else - echo "Local cnt file doesn't exist, so creat it ..." | tee $LOG_FILE + echo "Local cnt file doesn't exist, so creat it ..." echo 1 > $LOCAL_CNT_FILE fi - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something @@ -51,7 +51,7 @@ start_os_reboot(){ local_cnt=`cat $LOCAL_CNT_FILE` if [ $local_cnt -le $aim_cnt ];then - echo "Index $local_cnt : will execute reboot" | tee $LOG_FILE + echo "Index $local_cnt : will execute reboot" sleep 1 diff --git a/01.stress_script/outband_ac_cycle.sh b/01.stress_script/outband_ac_cycle.sh index a55f058..307e142 100644 --- a/01.stress_script/outband_ac_cycle.sh +++ b/01.stress_script/outband_ac_cycle.sh @@ -34,7 +34,7 @@ print_usage(){ # } pre_check(){ - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something @@ -48,16 +48,16 @@ start_ac_cycle(){ cnt=$(($cnt+1)) pre_check - echo ">>> start test index $cnt, will perform AC cycle" | tee $LOG_FILE + echo ">>> start test index $cnt, will perform AC cycle" - ipmitool -I lanplus -H $bmcip -U $username -P $password raw 0x3c 0x28 0xff 0xfc | tee $LOG_FILE + ipmitool -I lanplus -H $bmcip -U $username -P $password raw 0x3c 0x28 0xff 0xfc sleep 10 - ipmitool -I lanplus -H $bmcip -U $username -P $password raw 0x3c 0x28 0xff 0xfd | tee $LOG_FILE + ipmitool -I lanplus -H $bmcip -U $username -P $password raw 0x3c 0x28 0xff 0xfd if [ $cnt -le $aim_cnt ];then sleep 180 else - echo ">>> Complete test , will exit ..." | tee $LOG_FILE + echo ">>> Complete test , will exit ..." break; fi diff --git a/01.stress_script/outband_dc_cycle.sh b/01.stress_script/outband_dc_cycle.sh index a0e517d..15be37f 100644 --- a/01.stress_script/outband_dc_cycle.sh +++ b/01.stress_script/outband_dc_cycle.sh @@ -34,7 +34,7 @@ print_usage(){ # } pre_check(){ - echo "---------------------------------------------" | tee $LOG_FILE + echo "---------------------------------------------" #Todo if need check something @@ -48,14 +48,14 @@ start_dc_cycle(){ cnt=$(($cnt+1)) pre_check - echo ">>> start test index $cnt, will perform power cycle" | tee $LOG_FILE + echo ">>> start test index $cnt, will perform power cycle" - ipmitool -I lanplus -H $bmcip -U $username -P $password power cycle | tee $LOG_FILE + ipmitool -I lanplus -H $bmcip -U $username -P $password power cycle if [ $cnt -le $aim_cnt ];then sleep 120 else - echo ">>> Complete test , will exit ..." | tee $LOG_FILE + echo ">>> Complete test , will exit ..." break; fi