From e5821301f6b7d4a695956cd0ab7bbfc3eb017d58 Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Fri, 2 Jun 2023 21:33:05 +0200 Subject: [PATCH] dbginfo.sh: exclude (empty) cpu subdirs under zfcp sdev block mq sysfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With many CPUs, such as triple digit counts, the by default many empty sysfs directories are prohibitive to collect, especially if the number of SCSI disk devices is also large, such as 4-digit counts. Excluding them from being collected from sysfs saves hundreds times thousands of archive entries and inodes on expansion. Since the number device-mapper devices (multipath and other target types such as LVM) is smaller and can include devices not backed by zfcp, keep collecting /sys/devices/virtual/block/dm-[0-9]*/mq/0/cpu[0-9]*/ Definitely keep collecting /sys/kernel/debug/block/{sd,dm-}*/hctx0/cpu[0-9]*/ as it contains actual statistics files: completed default_rq_list dispatched merged poll_rq_list read_rq_list Signed-off-by: Steffen Maier Signed-off-by: Jan Höppner --- scripts/dbginfo.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index 2bfe9b4b..60739ba8 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -836,6 +836,7 @@ collect_sysfs() { -x '*/page_idle/bitmap*' \ -x '*/tracing/per_cpu/*' \ -x '*/tracing/free_buffer' \ + -x '*/devices/css[0-9]*/[0-9]*.*.*/[0-9]*.*.*/host[0-9]*/rport-[0-9]*:*-*/target[0-9]*:*:*/[0-9]*:*:*:*/block/sd*/mq/0/cpu[0-9]*' \ --ignore-failed-read -J 1 -T 5 2>>${OUTPUT_FILE_SYSFS}.err rc=$? else @@ -863,6 +864,7 @@ collect_sysfs() { -a -not \( -path '*page_idle*' -a -name 'bitmap*' \) \ -a -not -path '*tracing/per_cpu*' \ -a -not -path '*/tracing/free_buffer' \ + -a -not -path '*/devices/css[0-9]*/[0-9]*.*.*/[0-9]*.*.*/host[0-9]*/rport-[0-9]*:*-*/target[0-9]*:*:*/[0-9]*:*:*:*/block/sd*/mq/0/cpu[0-9]*' \ 2>/dev/null | while IFS= read -r file_name; do echo " ${file_name}" if ! dd if="${file_name}" status=noxfer iflag=nonblock \