diff --git a/glances/client.py b/glances/client.py index 7e65966b..308f2061 100644 --- a/glances/client.py +++ b/glances/client.py @@ -36,7 +36,6 @@ class GlancesClient: self.args = args self.config = config - print(args) self._quiet = args.quiet self.refresh_time = args.time diff --git a/glances/client_browser.py b/glances/client_browser.py index e337258d..8e0ec721 100644 --- a/glances/client_browser.py +++ b/glances/client_browser.py @@ -95,12 +95,12 @@ class GlancesClientBrowser: # Mandatory stats try: # CPU% - cpu_percent = 100 - orjson.loads(s.getCpu())['idle'] + cpu_percent = 100 - orjson.loads(s.getPlugin('cpu'))['idle'] server['cpu_percent'] = f'{cpu_percent:.1f}' # MEM% - server['mem_percent'] = orjson.loads(s.getMem())['percent'] + server['mem_percent'] = orjson.loads(s.getPlugin('mem'))['percent'] # OS (Human Readable name) - server['hr_name'] = orjson.loads(s.getSystem())['hr_name'] + server['hr_name'] = orjson.loads(s.getPlugin('system'))['hr_name'] except (OSError, Fault, KeyError) as e: logger.debug(f"Error while grabbing stats form server ({e})") server['status'] = 'OFFLINE' @@ -120,7 +120,7 @@ class GlancesClientBrowser: # Optional stats (load is not available on Windows OS) try: # LOAD - load_min5 = orjson.loads(s.getLoad())['min5'] + load_min5 = orjson.loads(s.getPlugin('load'))['min5'] server['load_min5'] = f'{load_min5:.2f}' except Exception as e: logger.warning(f"Error while grabbing stats form server ({e})")