From 3d58e948bb2a4484aab5c9457cca89a045b3cb80 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Sun, 25 Aug 2024 10:57:28 -0400 Subject: [PATCH] [processor] Add a timeout to turbostat collection The `turbostat` command has been seen to hit the default 5-minute timeout for reasons that are not immedately obvious. The behavior pattern is that the `turbostat --debug sleep 10` command this plugin captures may not exit until some form of input is received, at which point the command "fails successfully" with the following message: `turbostat: get_rapl_counters: failed to read perf_data (8 1): Success` Prevent this condition from holding up sos report execution by adding a timeout to this collection. Resolves: #3753 Signed-off-by: Jake Hunsaker --- sos/report/plugins/processor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sos/report/plugins/processor.py b/sos/report/plugins/processor.py index bb0de290a1..44f07dca34 100644 --- a/sos/report/plugins/processor.py +++ b/sos/report/plugins/processor.py @@ -66,9 +66,11 @@ def setup(self): "cpupower frequency-info", "cpupower info", "cpupower idle-info", - "turbostat --debug sleep 10", ], cmd_as_tag=True, pred=cpupower_pred) + self.add_cmd_output("turbostat --debug sleep 10", cmd_as_tag=True, + pred=cpupower_pred, timeout=15) + if '86' in self.policy.get_arch(): self.add_cmd_output("x86info -a")