Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-Launcher
Commits
0f897192
Commit
0f897192
authored
Jan 27, 2022
by
Alejandro Homs Puron
Browse files
[SET_CPU_AFFINITY] IrqBalanceMgr uses service to check the status
parent
a6f3f1cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/set_cpu_affinity
View file @
0f897192
...
...
@@ -357,8 +357,12 @@ class IrqBalanceMgr:
@
classmethod
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'
)
@
classmethod
def
setActive
(
klass
,
active
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment