Skip to content

Commit

Permalink
hwbench/turbostat: Using long name options
Browse files Browse the repository at this point in the history
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 <e.velu@criteo.com>
  • Loading branch information
ErwanAliasr1 committed May 30, 2024
1 parent 0ad09dd commit 6f5ac70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hwbench/environment/turbostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6f5ac70

Please sign in to comment.