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