fix ( script : remove tee)
This commit is contained in:
parent
5026475542
commit
355daa739e
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user