From d1b5cfea0b086ee5b5d68ab6bf9cba463dea25a7 Mon Sep 17 00:00:00 2001 From: ETWen Date: Thu, 20 Aug 2026 11:12:03 +0800 Subject: [PATCH] feat(ttl): Wire BMC monitors into Script B/C, log BMC version in A Script A: dump the BMC banner via `bmc-manager run 'cat /etc/issue'`, and add the missing `wait` before `show boot`. Script B: start bmc_monitor_ddr.sh and bmc_monitor.sh alongside the host stress load. Script C: stop both and dump their logs into the master log. bmc_monitor.sh: INTERVAL_SEC 5 -> 10. Known blockers, filed here so they are not lost -- this wiring does not work yet as written: 1. `bmc_monitor.sh tail` runs `tail -n 50 -f`, which never returns. Script C blocks on the first one and never reaches CHECK Stress results, the traffic counters, or the final messagebox. It needs a non-following dump (cat) instead. 2. Both scripts are mode 100644 and are the first .sh here meant to be executed rather than sourced. do_start re-execs "$SCRIPT_PATH" __daemon directly, so the execute bit is required even when invoked through bash -- and a Windows -> USB -> DUT copy cannot carry it. A chmod +x is needed before the start calls, as Script B already does for mlucas-avx2. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM --- src/Script_ABC_Blanton/1_Blanton_Script_A.ttl | 5 +++++ src/Script_ABC_Blanton/2_Blanton_Script_B.ttl | 7 +++++++ src/Script_ABC_Blanton/3_Blanton_Script_C.ttl | 11 +++++++++++ src/Script_ABC_Blanton/Blanton_Script/bmc_monitor.sh | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl index eabac5b..eab0d02 100644 --- a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl +++ b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl @@ -50,8 +50,13 @@ sprintf2 cmd 'sudo date -s "%s %s"' datestr timestr sendln cmd ; ========== Show Build Name ========== +wait prompt_sonic_root sendln "show boot" +; ========== BMC version ========== +wait prompt_sonic_root +sendln "bmc-manager run 'cat /etc/issue'" + ; ========== Load Shell Script ========== wait prompt_sonic_root sendln "source ~/Blanton_Script/blanton_fpga_pcimem.sh" diff --git a/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl b/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl index f0374bd..0defb46 100644 --- a/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl +++ b/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl @@ -20,6 +20,13 @@ 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 &" +; ========== BMC Stress Test ========== +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor_ddr.sh start" +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor.sh start" + + ; ========== DDR MEMORY STRESS TEST ========== wait prompt_sonic_root sendln "python ~/hammer/tools/stress_mem.py &" diff --git a/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl b/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl index 016a234..b6b4450 100644 --- a/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl +++ b/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl @@ -25,6 +25,17 @@ include "utils/show_pcie_error_reg_DDR.ttl" include "utils/show_pcie_error_reg_I210.ttl" include "utils/show_pcie_error_reg_SSD.ttl" +; ========== BMC TAKE DATA ========== +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor_ddr.sh stop" +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor.sh stop" +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor.sh tail" +wait prompt_sonic_root +sendln "./Blanton_Script/bmc_monitor_ddr.sh tail" + + ; ========== CHECK Stress results ========== wait prompt_sonic_root sendln "cat ~/hammer/tools/amd/mlucas_amm_log" diff --git a/src/Script_ABC_Blanton/Blanton_Script/bmc_monitor.sh b/src/Script_ABC_Blanton/Blanton_Script/bmc_monitor.sh index 87b3d11..6061c3e 100644 --- a/src/Script_ABC_Blanton/Blanton_Script/bmc_monitor.sh +++ b/src/Script_ABC_Blanton/Blanton_Script/bmc_monitor.sh @@ -42,7 +42,7 @@ COMMANDS=( ) # Seconds to wait after a full round (all COMMANDS executed) before the next one -INTERVAL_SEC=5 +INTERVAL_SEC=10 # Seconds to wait between two commands inside the same round (0 = no wait) INTER_CMD_DELAY_SEC=0