diff options
author | nicolargo <nicolas@nicolargo.com> | 2018-05-19 16:36:08 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2018-05-19 16:36:08 +0200 |
commit | c4c0a2d5d368e821d1b113743ee20e77b14c53b6 (patch) | |
tree | c336244cd4b627d84deabcde52060cf925aebc8c /glances/amps_list.py | |
parent | 3db4e105d39142f68720db71d1a04046ac34dcdc (diff) |
AMP for kernel process is not working #1261
Diffstat (limited to 'glances/amps_list.py')
-rw-r--r-- | glances/amps_list.py | 3 |
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'])) |