From fcb503ea3c9bd8612726aaea9d46e98af86fc049 Mon Sep 17 00:00:00 2001 From: Joern Siglen Date: Fri, 4 Feb 2022 12:15:02 +0100 Subject: [PATCH] dbginfo.sh: sync excludes in sysfs data collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit critical paths in dump2tar data collection have been already excluded - this update will sync the excludes in the fall back, running in case dump2tar is missing or failing on a system By this we also sync the filtering to match exact the same pattern. Reported by: Steffen Maier Signed-off-by: Joern Siglen Reviewed-by: Sa Liu Fixes: 12c84469fd02 ("dbginfo.sh: exclude reading page_idle/bitmap sysfs attribute") Fixes: b627b8d8e1ab ("Initial s390-tools-2.0.0 import") Signed-off-by: Jan Höppner --- scripts/dbginfo.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index 59f040f2..6cfa4b83 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -743,8 +743,10 @@ collect_sysfs() { # more than 5 seconds (-T 5) such as an active ftrace buffer. # error messages are not written to the log dump2tar /sys -z -o "${OUTPUT_FILE_SYSFS}.tgz" \ - -x '*/tracing/trace_pipe*' -x '*/page_idle/bitmap*' \ - -x '*/tracing/per_cpu/*' --ignore-failed-read -J 1 -T 5 2>>${OUTPUT_FILE_SYSFS}.err + -x '*/tracing/trace_pipe*' \ + -x '*/page_idle/bitmap*' \ + -x '*/tracing/per_cpu/*' \ + --ignore-failed-read -J 1 -T 5 2>>${OUTPUT_FILE_SYSFS}.err if [ $? -ne 0 ] ; then echo "${SCRIPTNAME}: Warning: dump2tar failed or is unavailable" @@ -756,7 +758,10 @@ collect_sysfs() { mkdir -p "${WORKPATH}${dir_name}" done - find /sys -noleaf -type f -perm /444 -a -not -name "*trace_pipe*"\ + find /sys -noleaf -type f -perm /444 \ + -a -not \( -path '*tracing*' -a -name "trace_pipe*" \) \ + -a -not \( -path '*page_idle*' -a -name 'bitmap*' \) \ + -a -not -path '*tracing/per_cpu*' \ 2>/dev/null | while IFS= read -r file_name; do echo " ${file_name}" if ! dd if="${file_name}" status=noxfer iflag=nonblock \