On Fri, 2026-07-17 at 17:46 +0200, Gabriele Monaco wrote:
+# loads may flood the ringbuffer, wait for all pending printks
+wait_dmesg_flush() {
+ local last_before last_after=$(dmesg | grep "rv:" | tail -n 1 ||
true)
+ while [ "$last_before" != "$last_after" ]; do
+ last_before=$last_after
+ sleep .3
+ last_after=$(dmesg | grep "rv:" | tail -n 1 || true)
+ done
}
echo 1 > monitors/wwnr/enable
echo printk > monitors/wwnr/reactors
load
+wait_dmesg_flush
On some systems this may trigger wwnr's reactions and run indefinitely, I'm
going to send a V5 moving this after turning monitoring/reacting of and adding a
timeout, just in case those switches don't work.
echo 0 > monitoring_on
! load || false
echo 1 > monitoring_on
load
+wait_dmesg_flush
echo 0 > reacting_on
! load || false