summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 12:40:43 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 12:40:43 -0400
commitff97caae114db5447fc71b89ead7e8d2c4d404a8 (patch)
treeeddb838eeb8c2995d741ae3f9875106bce3e7762
parentce86b083311adb4d2f4fd907fd81d504898ff438 (diff)
downloadopen-iov-ff97caae114db5447fc71b89ead7e8d2c4d404a8.tar.gz
open-iov-ff97caae114db5447fc71b89ead7e8d2c4d404a8.zip
guest-diag: injector handles slow chan_dump (3s wait, last-marker parse)
-rwxr-xr-xtools/guest-diag/inject_counters.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/guest-diag/inject_counters.sh b/tools/guest-diag/inject_counters.sh
index d1d004c..6586a95 100755
--- a/tools/guest-diag/inject_counters.sh
+++ b/tools/guest-diag/inject_counters.sh
@@ -61,8 +61,9 @@ DMESG_MARK="sema-inject-marker-$$-$(date +%s)"
all_grs() {
echo "$DMESG_MARK" | sudo tee /dev/kmsg >/dev/null
echo 1 | sudo tee "$PARAM/chan_dump" >/dev/null
- sleep 1
- sudo dmesg | awk -v m="$DMESG_MARK" 'index($0, m) { f = 1; next } f' \
+ sleep 3
+ sudo dmesg | awk -v m="$DMESG_MARK" \
+ '{ l[NR] = $0 } index($0, m) { last = NR } END { for (i = last + 1; i <= NR; i++) print l[i] }' \
| grep -o 'sema-chan-dump: h=0x[0-9a-f]* eng=0' \
| grep -o '0x[0-9a-f]*' | sort -u | paste -sd, || true
}