diff options
Diffstat (limited to 'tools/guest-diag')
| -rwxr-xr-x | tools/guest-diag/run_cycles_long.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/guest-diag/run_cycles_long.sh b/tools/guest-diag/run_cycles_long.sh index fa8dd77..479c49d 100755 --- a/tools/guest-diag/run_cycles_long.sh +++ b/tools/guest-diag/run_cycles_long.sh @@ -79,6 +79,10 @@ RC=0 for TAG in "$@"; do say "=== $TAG start (GZ_SECS=$GZ_SECS GLF_FRAMES=$GLF_FRAMES params=$(basename "$INSMOD_PARAMS")) ===" DM_SINCE=$(date "+%Y-%m-%d %H:%M:%S") + # Continuous kernel-log capture: the dmesg ring wraps in <4 min at the + # debug volume, which silently truncated per-cycle evidence (c921). + sudo dmesg -w > "$BACKUP/$TAG-dmesg-watch.log" 2>&1 & + DM_WATCH_PID=$! if ! INSMOD_PARAMS="$INSMOD_PARAMS" bash "$HERE/cycle-r1780.sh" "$TAG" "$MODULE" \ > "$BACKUP/$TAG-cycle.log" 2>&1; then say "$TAG CYCLE FAILED (see $BACKUP/$TAG-cycle.log)" @@ -109,8 +113,12 @@ for TAG in "$@"; do say "$TAG mission: $DONE" fi + kill "$DM_WATCH_PID" 2>/dev/null sudo dmesg -T --since "$DM_SINCE" 2>/dev/null > "$BACKUP/$TAG-dmesg.log" || \ sudo dmesg 2>/dev/null | tail -n 4000 > "$BACKUP/$TAG-dmesg.log" + # Merge the streamed capture (it has the lines the ring dropped). + [ -s "$BACKUP/$TAG-dmesg-watch.log" ] && \ + cat "$BACKUP/$TAG-dmesg-watch.log" >> "$BACKUP/$TAG-dmesg.log" gexec 30 'cat /tmp/mission-gl.log 2>/dev/null' > "$BACKUP/$TAG-gl.log" gexec 30 'cat /tmp/mission-gz.log 2>/dev/null' > "$BACKUP/$TAG-gz.log" gexec 30 'tail -c 3000 /tmp/mission-run.log 2>/dev/null' > "$BACKUP/$TAG-run.log" |
