Commit 0f897192 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron
Browse files

[SET_CPU_AFFINITY] IrqBalanceMgr uses service to check the status

parent a6f3f1cd
......@@ -357,8 +357,12 @@ class IrqBalanceMgr:
def getActive(klass):
cmd = ['bash', '-c', 'ps -ef | grep -v grep | grep irqbalance']
return SystemCmd(cmd).execute() == 0
cmd = SystemCmd(['service', 'irqbalance', 'status'])
service = cmd.doPopen(stdout=PIPE, text=True)
for l in service.stdout:
if l.strip().startswith('Active'):
return 'running' in l
raise RuntimeError('Could not check irqbalance service')
def setActive(klass, active):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment