You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.3 KiB
86 lines
2.3 KiB
#!/bin/bash |
|
|
|
#Collect log |
|
time1=$(date +%Y-%m-%d-%H%M%S) |
|
touch /home/br1/zw/topo_stress_log/$time1-topo-stress-log.log |
|
exec > >(tee /home/br1/zw/topo_stress_log/$time1-topo-stress-log.log) 2>&1 |
|
|
|
#Topo test |
|
for((loop=1;loop<=1;loop++)); |
|
do |
|
# exp=6 |
|
UBB_BMC_IP=10.102.12.43 |
|
test_time=120s |
|
echo "Loop $loop" |
|
echo "==================================================================" |
|
time=$(date +%Y-%m-%d/%H:%M:%S) |
|
echo "*** Start-Current time is: $time ***" |
|
echo "*****topo stress test*****" |
|
for((topo=0;topo<=2;topo++)); |
|
do |
|
topo_array=(0605080702010403 |
|
0506070801020304 |
|
0708050603040102) |
|
# 0403020108070605 |
|
topo_test=${topo_array[$topo]} |
|
echo "Test topo is: $topo_test" |
|
|
|
for((e=0;e<=1;e++)); |
|
do |
|
e_array=(6 |
|
8) |
|
exp_test=${e_array[$e]} |
|
echo "Test exp is: $exp_test" |
|
vuart -i $UBB_BMC_IP -e $exp_test -c vcmd -p "fl786 route $topo_test" |
|
done |
|
|
|
brsmi reset -g |
|
sleep 1s |
|
|
|
echo "Exp reset:" |
|
for((e=0;e<=1;e++)); |
|
do |
|
e_array=(6 |
|
8) |
|
exp_test=${e_array[$e]} |
|
echo "Test exp is: $exp_test" |
|
ocs_link_reset -i $UBB_BMC_IP -e $exp_test |
|
done |
|
sleep 8s |
|
|
|
echo "Begin training:" |
|
for((e=0;e<=1;e++)); |
|
do |
|
e_array=(6 |
|
8) |
|
exp_test=${e_array[$e]} |
|
echo "Exp $exp_test training" |
|
cd /home/br1/br-tool/25.08.27/topo/ |
|
./ocsTopo -p $exp_test |
|
sleep 0.5s |
|
cd /home/br1/zw |
|
echo -e |
|
echo "***Test exp is: $exp_test *** Test topo is: $topo_test ***Start" |
|
ocsdiag -i $UBB_BMC_IP -e $exp_test -c vcmd -p "rtmr all" |grep -e RECOVERY -e LNK_STA |
|
echo -e |
|
done |
|
|
|
sleep $test_time |
|
|
|
for((e=0;e<=1;e++)); |
|
do |
|
e_array=(6 |
|
8) |
|
exp_test=${e_array[$e]} |
|
echo -e |
|
echo "Test exp is: $exp_test *** Test topo is: $topo_test ***End" |
|
ocsdiag -i $UBB_BMC_IP -e $exp_test -c vcmd -p "rtmr all" |grep -e RECOVERY -e LNK_STA |
|
done |
|
echo "Test topo finished: $topo_test" |
|
echo -e |
|
done |
|
echo -e |
|
time=$(date +%Y-%m-%d/%H:%M:%S) |
|
echo "*** End-Current time is: $time ***" |
|
echo -e |
|
done
|
|
|