Provide information to user if sysdump might be hanging
authorMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:01:42 +0000 (17:01 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:36:21 +0000 (17:36 +0100)
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

index bb20182..b5329b3 100755 (executable)
@@ -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