From 9193fd5e8a11c5e93fcfe5ec47aa7c046b9ba8b3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 5 Mar 2021 17:01:42 +0100 Subject: [PATCH] Provide information to user if sysdump might be hanging Sometimes new files show up in the kernel and sysdump might be hanging while reading them. To make this more visible to the user and how to track this down, provide information, if not running with -q/-quiet. Related to https://github.com/grml/grml-hwinfo/issues/3 --- grml-hwinfo | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/grml-hwinfo b/grml-hwinfo index bb20182..b5329b3 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -214,7 +214,16 @@ cd "${OUTDIR}" || exit 1 mdstat meminfo modules mtrr pci uptime version ; do [ -r /proc/$i ] && cat /proc/$i > proc_$i done + + if ! $_opt_quiet ; then + echo "Starting sysdump..." + echo " NOTE: if it seems to be hanging at this stage file a bug report with output of:" + echo " lsof -p \$(pgrep -f "\$\(which sysdump\)")" + fi exectest sysdump && sysdump > ./sysdump 2>./sysdump.error + if ! $_opt_quiet ; then + echo "Execution of sysdump finished." + fi exectest cpuid && cpuid > ./cpuid 2>./cpuid.error -- 2.1.4