From 310efa7db916533bc71b51a757e433a2f24be875 Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Sun, 9 Aug 2026 21:55:22 +0530 Subject: [PATCH] [irqbalance] Add plugin for the IRQ balancing daemon irqbalance is installed by default on Fedora, RHEL, Debian and Ubuntu, but sos has no plugin for it and no other plugin references it. Its configuration never reaches an sosreport, which matters when interrupts are not landing on the CPUs an administrator expects. The unit reads two environment files: EnvironmentFile=@pkgconfdir@/irqbalance.env EnvironmentFile=-@usrconfdir@/irqbalance configure.ac resolves those to $prefix/etc/default and ${sysconfdir}/default, so the effective path differs between distributions. Both conventional locations are collected, along with any systemd drop-ins, since IRQBALANCE_BANNED_CPUS, IRQBALANCE_BANNED_CPULIST and IRQBALANCE_ARGS are set there. irqbalance.h defines the runtime socket directory as /run/irqbalance, matching RuntimeDirectory=irqbalance/ in the unit; a listing of it is taken rather than the sockets themselves. The daemon holds no credentials, so no forbidden paths are needed. Signed-off-by: Suraj Patil --- sos/report/plugins/irqbalance.py | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sos/report/plugins/irqbalance.py diff --git a/sos/report/plugins/irqbalance.py b/sos/report/plugins/irqbalance.py new file mode 100644 index 0000000000..8c85f79872 --- /dev/null +++ b/sos/report/plugins/irqbalance.py @@ -0,0 +1,43 @@ +# Copyright (C) 2026 Suraj Patil + +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +from sos.report.plugins import Plugin, IndependentPlugin + + +class IrqBalance(Plugin, IndependentPlugin): + + short_desc = 'IRQ balancing daemon' + + plugin_name = 'irqbalance' + profiles = ('system', 'hardware', 'performance') + + packages = ('irqbalance',) + services = ('irqbalance',) + + def setup(self): + # The unit reads its arguments from two environment files: the + # packaged defaults and an optional administrator override. Which + # of the two paths is used depends on how the package was built, + # so collect both conventional locations. + self.add_copy_spec([ + '/etc/sysconfig/irqbalance', + '/etc/default/irqbalance', + '/usr/lib/systemd/system/irqbalance.service.d/', + '/etc/systemd/system/irqbalance.service.d/', + ]) + + self.add_dir_listing('/run/irqbalance', tags='irqbalance_run_dir') + + self.add_cmd_output('irqbalance --version', + tags='irqbalance_version') + + self.add_journal(units='irqbalance') + +# vim: set et ts=4 sw=4 :