提交 22676c6a 编写于 作者: N nicolargo

Glances PsUtil ValueError on IoCounter with TASK kernel options #1440

上级 ec108fb6
......@@ -28,6 +28,7 @@ Bugs corrected:
* Prometheus integration broken with latest prometheus_client #1397
* "sorted by ?" is displayed when setting the sort criterion to "USER" #1407
* IP plugin displays incorrect subnet mask #1417
* Glances PsUtil ValueError on IoCounter with TASK kernel options #1440
Others:
......
......@@ -177,7 +177,7 @@ else:
def u(s, errors='replace'):
if isinstance(s, text_type):
return s.encode('utf-8',errors=errors)
return s.encode('utf-8', errors=errors)
return s.decode('utf-8', errors=errors)
def b(s, errors='replace'):
......
......@@ -29,6 +29,7 @@ LINUX = sys.platform.startswith('linux')
MACOS = sys.platform.startswith('darwin')
SUNOS = sys.platform.startswith('sunos')
WINDOWS = sys.platform.startswith('win')
WSL = "linux" in platform.system().lower() and "microsoft" in platform.uname()[3].lower()
# Set the AMPs, plugins and export modules path
work_path = os.path.realpath(os.path.dirname(__file__))
......
......@@ -21,7 +21,7 @@ import operator
import os
from glances.compat import iteritems, itervalues, listitems, iterkeys
from glances.globals import BSD, LINUX, MACOS, SUNOS, WINDOWS
from glances.globals import BSD, LINUX, MACOS, SUNOS, WINDOWS, WSL
from glances.timer import Timer, getTimeSinceLastUpdate
from glances.filter import GlancesFilter
from glances.logger import logger
......@@ -236,7 +236,7 @@ class GlancesProcesses(object):
'memory_percent', 'name', 'nice', 'pid', 'ppid',
'status', 'username', 'status', 'num_threads']
# io_counters availability: Linux, BSD, Windows, AIX
if not MACOS and not SUNOS:
if not MACOS and not SUNOS and not WSL:
standard_attrs += ['io_counters']
# gids availability: Unix
if not WINDOWS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册