|
|
900e1b |
From b09ed75b09075d86c184b0a63cce9260f2cee4ca Mon Sep 17 00:00:00 2001
|
|
|
900e1b |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
900e1b |
Date: Mon, 30 Aug 2021 11:27:48 +0200
|
|
|
900e1b |
Subject: [PATCH] [processor] Apply sizelimit to /sys/devices/system/cpu/cpuX
|
|
|
900e1b |
|
|
|
900e1b |
Copy /sys/devices/system/cpu/cpuX with separately applied sizelimit.
|
|
|
900e1b |
|
|
|
900e1b |
This is required for systems with tens/hundreds of CPUs where the
|
|
|
900e1b |
cumulative directory size exceeds 25MB or even 100MB.
|
|
|
900e1b |
|
|
|
900e1b |
Resolves: #2639
|
|
|
900e1b |
Closes: #2665
|
|
|
900e1b |
|
|
|
900e1b |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
900e1b |
---
|
|
|
900e1b |
sos/report/plugins/processor.py | 9 ++++++++-
|
|
|
900e1b |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
900e1b |
|
|
|
900e1b |
diff --git a/sos/report/plugins/processor.py b/sos/report/plugins/processor.py
|
|
|
900e1b |
index 0ddfd126..2df2dc9a 100644
|
|
|
900e1b |
--- a/sos/report/plugins/processor.py
|
|
|
900e1b |
+++ b/sos/report/plugins/processor.py
|
|
|
900e1b |
@@ -7,6 +7,7 @@
|
|
|
900e1b |
# See the LICENSE file in the source distribution for further information.
|
|
|
900e1b |
|
|
|
900e1b |
from sos.report.plugins import Plugin, IndependentPlugin
|
|
|
900e1b |
+import os
|
|
|
900e1b |
|
|
|
900e1b |
|
|
|
900e1b |
class Processor(Plugin, IndependentPlugin):
|
|
|
900e1b |
@@ -34,7 +35,13 @@ class Processor(Plugin, IndependentPlugin):
|
|
|
900e1b |
self.add_copy_spec([
|
|
|
900e1b |
"/proc/cpuinfo",
|
|
|
900e1b |
"/sys/class/cpuid",
|
|
|
900e1b |
- "/sys/devices/system/cpu"
|
|
|
900e1b |
+ ])
|
|
|
900e1b |
+ # copy /sys/devices/system/cpu/cpuX with separately applied sizelimit
|
|
|
900e1b |
+ # this is required for systems with tens/hundreds of CPUs where the
|
|
|
900e1b |
+ # cumulative directory size exceeds 25MB or even 100MB.
|
|
|
900e1b |
+ cdirs = self.listdir('/sys/devices/system/cpu')
|
|
|
900e1b |
+ self.add_copy_spec([
|
|
|
900e1b |
+ os.path.join('/sys/devices/system/cpu', cdir) for cdir in cdirs
|
|
|
900e1b |
])
|
|
|
900e1b |
|
|
|
900e1b |
self.add_cmd_output([
|
|
|
900e1b |
--
|
|
|
900e1b |
2.31.1
|
|
|
900e1b |
|