Merge pull request #466 from desbma/web

Support --hide-kernel-threads option for web interface
This commit is contained in:
Nicolas Hennion 2014-12-30 22:36:36 +01:00
commit d2b40fd9a5

View File

@ -20,6 +20,8 @@
"""Glances Web Interface (Bottle based)."""
# Import Glances libs
from glances.core.glances_globals import is_windows
from glances.core.glances_processes import glances_processes
from glances.core.glances_stats import GlancesStats
from glances.outputs.glances_bottle import GlancesBottle
@ -32,6 +34,10 @@ class GlancesWebServer(object):
# Init stats
self.stats = GlancesStats(config)
if (not is_windows) and args.no_kernel_threads:
# Ignore kernel threads in process list
glances_processes.disable_kernel_threads()
# Initial system informations update
self.stats.update()