diff --git a/src/Script_ABC_Blanton/4_1_Blanton_Script_thermal.ttl b/src/Script_ABC_Blanton/4_1_Blanton_Script_thermal.ttl new file mode 100644 index 0000000..5d5914c --- /dev/null +++ b/src/Script_ABC_Blanton/4_1_Blanton_Script_thermal.ttl @@ -0,0 +1,193 @@ +include "config.ttl" + +flushrecv +;================================================================ +; Log File Creation +;================================================================ +gettime str_starttime "%Y%m%d-%H%M%S" +getdir mdir + +if EN_log = 1 then + sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name strTestcase str_starttime + logopen filename 0 1 1 1 +endif + +; ========== Root Login ========== +wait prompt_login +sendln "admin" +wait "Password:" +sendln "YourPaSsWoRd" +wait prompt_sonic +sendln "sudo -i" + +; ========== Pre Setting ========== +; Make log directory +wait prompt_sonic_root +sendln "mkdir ./logs" + +; Setting System Time +getdate datestr +gettime timestr +sprintf2 cmd 'sudo date -s "%s %s"' datestr timestr +sendln cmd + +;Stress log clear +wait prompt_sonic_root +sendln "rm /host/hw-eval/jobs/*" + +; ========== HW Test Session ========== +; Clear session +wait prompt_sonic_root +sendln "hw-test-session finish" +wait prompt_sonic_root +sendln "bgctl reset --yes" +wait prompt_sonic_root +sendln "bgctl stop --all" +wait prompt_sonic_root +sendln "bgctl list" + +wait prompt_sonic_root +sendln "hw-test-session start" +wait prompt_sonic_root +sendln "hw-test-session log" +wait prompt_sonic_root +sendln "hw-test-session status" + +; ========== FAN SPEED ========== +wait prompt_sonic_root +sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/unbind" +wait prompt_sonic_root +sendln "sleep .5" +wait prompt_sonic_root +sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/bind" +wait prompt_sonic_root +sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/unbind" +wait prompt_sonic_root +sendln "sleep .5" +wait prompt_sonic_root +sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/bind" + +wait prompt_sonic_root +sprintf2 fan_ctrl_cmd 'fan-speed-control.sh %d' FAN_SPEED +sendln fan_ctrl_cmd + +wait "Set all configured fan channels to" +sendln "y" + +; ========== Wait DUT Init ========== +include "utils/wait_init.ttl" + +; ========== DUT Info ========== +wait prompt_sonic_root +sendln "show boot" +wait prompt_sonic_root +sendln "show version" +wait prompt_sonic_root +sendln "fwutil show status" +wait prompt_sonic_root +sendln "show system-memory" +wait prompt_sonic_root +sendln "show service" +wait prompt_sonic_root +sendln "show platform syseeprom" +wait prompt_sonic_root +sendln "show platform ssdhealth" +wait prompt_sonic_root +sendln "qfx5252-tpm-version" +wait prompt_sonic_root +sendln "/usr/sbin/nvme smart-log -H /dev/nvme0" +wait prompt_sonic_root +sendln "/usr/sbin/smartctl -x /dev/nvme0" + +; ========== BMC version ========== +;wait prompt_sonic_root +;sendln "bmc-manager run 'cat /etc/issue'" +wait prompt_sonic_root +sendln "bmc-first-enroll" +wait prompt_sonic_root +sendln "bmc-manager version" +wait prompt_sonic_root +sendln "bmc-manager status" + +; ========== CLEAR PCIE Error ========== +include "utils/show_pcie_error_reg_TH6_SWB0.ttl" +include "utils/show_pcie_error_reg_TH6_SWB1.ttl" +include "utils/show_pcie_error_reg_FPGA.ttl" +include "utils/show_pcie_error_reg_BMC.ttl" +include "utils/show_pcie_error_reg_DDR.ttl" +include "utils/show_pcie_error_reg_I210.ttl" +include "utils/show_pcie_error_reg_SSD.ttl" + +wait prompt_sonic_root +sendln "/usr/sbin/ras-mc-ctl --summary" + +; ========== Check PCIE tree + PCIE link status + GET PCIE bandwidth Test ========== +include "utils/pcie_bus.ttl" + +; ========== TAKE DATA ========== +include "utils/setup_pmon.ttl" +include "utils/show_dmesg.ttl" + +idle_cnt = 0 + +while idle_cnt < 300 + sprintf2 title 'Idle Loop - %d' idle_cnt + settitle title + ; Base info polling + include "utils/setup_pmon.ttl" + + ; TH6 Power Polling + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB0_power_readback.sh" + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB1_power_readback.sh" + wait prompt_sonic_root + sendln "~/Blanton_Script/avt_pmpower.sh -p ~/AVT_Linux_NDA_2.8.37/AVTCMD" + + wait prompt_sonic_root + sendln "sleep 1" + idle_cnt = idle_cnt + 1 +endwhile + +; ========== Full Load ========== +; AMD CPU STRESS TEST +; Clear the log file first +wait prompt_sonic_root +sendln "> ~/hammer/tools/amd/mlucas_amm_log" +wait prompt_sonic_root +sendln 'chmod +x ~/hammer/tools/amd/mlucas-avx2' +wait prompt_sonic_root +;sendln "~/hammer/tools/amd/mlucas-avx2 -s l -cpu 0:15 > ~/hammer/tools/amd/mlucas_amm_log 2>&1 &" +sendln "systemd-run --unit=mlucas-amm --property=Type=exec --property=Restart=always --property=RestartSec=2 /bin/bash -c '~/hammer/tools/amd/mlucas-avx2 -s l -cpu 0:15 >> ~/hammer/tools/amd/mlucas_amm_log 2>&1'" + +; TR518 TEST +wait prompt_sonic_root +sendln "~/Blanton_Script/blanton_tr518_thermal.sh start" + +settitle 'Full Load Loop' +while 1 + ; Base info polling + include "utils/setup_pmon.ttl" + + ; TH6 Power Polling + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB0_power_readback.sh" + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB1_power_readback.sh" + wait prompt_sonic_root + sendln "~/Blanton_Script/avt_pmpower.sh -p ~/AVT_Linux_NDA_2.8.37/AVTCMD" + + ; Background jobs Check + wait prompt_sonic_root + sendln "bgctl list" + wait prompt_sonic_root + sendln "jobs" + wait prompt_sonic_root + sendln "systemctl is-active mlucas-amm" + wait prompt_sonic_root + sendln "/usr/sbin/nvme smart-log -H /dev/nvme0" + wait prompt_sonic_root + sendln "/usr/sbin/smartctl -x /dev/nvme0" + wait prompt_sonic_root + sendln "sleep 1" +endwhile