Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Version 2.12.0 (unreleased)

* Bugfix: Remove the Linux version check, which was broken and no longer needed.
Patch by Michael Greenberg.
* Bugfix: ``pyperf system`` no longer prints systemctl's "Unit
irqbalance.service could not be found." message when irqbalance isn't
installed. Patch by Michael Greenberg.

Version 2.11.0 (2026-11-08)
---------------------------
Expand Down
17 changes: 12 additions & 5 deletions pyperf/_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ def get_output(cmd):
try:
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)
except OSError as exc:
if exc.errno == errno.ENOENT:
return (127, '')
return (127, '', '')
else:
raise

stdout = popen_communicate(proc)[0]
stdout, stderr = popen_communicate(proc)
exitcode = proc.returncode
return (exitcode, stdout)
return (exitcode, stdout, stderr)


def use_intel_pstate():
Expand Down Expand Up @@ -650,7 +651,13 @@ def __init__(self, system):

def read_irqbalance_systemctl(self):
cmd = ('systemctl', 'status', 'irqbalance')
exitcode, stdout = get_output(cmd)
exitcode, stdout, stderr = get_output(cmd)
if exitcode == 4 and not stdout:
# systemctl exits with status 4 and prints its error on stderr
# when there is no irqbalance unit. The service isn't
# installed, so there is nothing to show or change.
self.systemctl = True
return
if not stdout:
# systemctl is not installed? ignore errors
self.systemctl = False
Expand Down Expand Up @@ -682,7 +689,7 @@ def read_irqbalance_systemctl(self):

def read_irqbalance_service(self):
cmd = ('service', 'irqbalance', 'status')
exitcode, stdout = get_output(cmd)
exitcode, stdout, stderr = get_output(cmd)
if not stdout:
# failed to the the status: ignore
return
Expand Down
Loading