summaryrefslogtreecommitdiffstats
path: root/glances/amps_list.py
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2018-05-19 16:36:08 +0200
committernicolargo <nicolas@nicolargo.com>2018-05-19 16:36:08 +0200
commitc4c0a2d5d368e821d1b113743ee20e77b14c53b6 (patch)
treec336244cd4b627d84deabcde52060cf925aebc8c /glances/amps_list.py
parent3db4e105d39142f68720db71d1a04046ac34dcdc (diff)
AMP for kernel process is not working #1261
Diffstat (limited to 'glances/amps_list.py')
-rw-r--r--glances/amps_list.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/glances/amps_list.py b/glances/amps_list.py
index 365d4c52..9794f979 100644
--- a/glances/amps_list.py
+++ b/glances/amps_list.py
@@ -112,9 +112,12 @@ class AmpsList(object):
# Do not update if the enable tag is set
continue
try:
+ # Search in both cmdline and name (for kernel thread, see #1261)
amps_list = [p for p in processlist for c in p['cmdline'] if re.search(v.regex(), c) is not None]
+ amps_list += [p for p in processlist if re.search(v.regex(), p['name']) is not None]
except (TypeError, KeyError):
continue
+ logger.info(amps_list)
if len(amps_list) > 0:
# At least one process is matching the regex
logger.debug("AMPS: {} process detected (PID={})".format(k, amps_list[0]['pid']))