From 6f5ac7077af34aed5355f74954200b7eb2628d5f Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 30 May 2024 15:06:36 +0200 Subject: [PATCH] hwbench/turbostat: Using long name options Starting Kernel 6.9, the -n option became ambigous which prevents turbostat to run with the following message: turbostat: option '-n' is ambiguous; possibilities: '-num_iterations' '-no-msr' '-no-perf' This commit is removing all short name options and replace them with long name to avoid this case. This patch got tested successfully from Kernel 5.19 (2022.4.16) up to the incoming 6.10 (2024.5.10). Signed-off-by: Erwan Velu --- hwbench/environment/turbostat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hwbench/environment/turbostat.py b/hwbench/environment/turbostat.py index 52e1b30..e2504c8 100644 --- a/hwbench/environment/turbostat.py +++ b/hwbench/environment/turbostat.py @@ -69,7 +69,7 @@ def check_version(self): english_env = os.environ.copy() english_env["LC_ALL"] = "C" self.process = subprocess.Popen( - ["turbostat", "-v"], + ["turbostat", "--version"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=english_env, @@ -148,14 +148,14 @@ def run(self, interval: float = 1, wait=False): "-c", f"{self.hardware.get_cpu().get_logical_cores_count()-1}", "turbostat", - "-c", + "--cpu", "core", - "-q", + "--quiet", "--interval", str(interval), - "-n", + "--num_iterations", "1", - "-s", + "--show", ] sensors = "" for sensor in CPUSTATS: