diagnix: add diag-pstore

/sys/fs/pstore is root-only and holds the kernel's crash records from
the previous boot, the only trace a hard freeze leaves when the journal
is cut off. diag-pstore prints them via the existing NOPASSWD sudo list.
ABOUTME updated for both diagnix changes.
This commit is contained in:
Hermenix committed 2026-11-20 01:34:41 +00:00
1 parent 5c48ef9c1e
commit 7a973aaee6
2 files changed
+15 -2

No files matched your search

+8
View File
@@ -43,6 +43,14 @@ let
done
'')
(script "diag-io" [ pkgs.iotop ] "iotop -b -o -n 3 -d 1")
(script "diag-pstore" [ ] ''
shopt -s nullglob
files=(/sys/fs/pstore/*)
if [ ''${#files[@]} -eq 0 ]; then echo "pstore is empty"; exit 0; fi
for f in "''${files[@]}"; do
echo "=== $f"; cat "$f" || true
done
'')
] ++ lib.optionals (runtime != null) [
(script "diag-docker-ps" [ ] ''
${rt} ps -a; ${rt} stats --no-stream; ${rt} system df