diff options
Diffstat (limited to 'tools/guest-diag/semfix_uvmt.py')
| -rwxr-xr-x | tools/guest-diag/semfix_uvmt.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/guest-diag/semfix_uvmt.py b/tools/guest-diag/semfix_uvmt.py index 12577ab..0d31394 100755 --- a/tools/guest-diag/semfix_uvmt.py +++ b/tools/guest-diag/semfix_uvmt.py @@ -115,11 +115,17 @@ def state_str(sem, st): def dmesg_releases(seen): - """Print/append new host-decoded releases (sema-push lines).""" + """Print/append new host-decoded releases (sema-push lines). + + Only lines after the last "sema-svc: thread started" marker count: dmesg + keeps the previous module load's lines and the old client's releases. + """ try: r = subprocess.run( ["sudo", "-n", "sh", "-c", - "dmesg -T | grep 'sema-push' | tail -300"], + "dmesg -T | awk '/sema-svc: thread started/{n=NR} " + "{l[NR]=$0} END{for(i=n+1;i<=NR;i++) print l[i]}' " + "| grep 'sema-push' | tail -300"], capture_output=True, text=True, timeout=10) except Exception: return |
