提交 be2ddb1a 编写于 作者: N Nicolas Hennion

No problem on run...

上级 e0bbd65b
......@@ -33,13 +33,9 @@ class GlancesStandalone():
# Init stats
self.stats = GlancesStats(config)
# Initial update
# !!! The first time Glances display wrong CPU/MEM information
# Initial system informations update
self.stats.update()
# !!! Usefull ?
self.refresh_time = args.time
# Init HTML output
# !!! TODO
# if html_tag:
......
......@@ -41,6 +41,7 @@ class glancesCurses:
# Init args
self.args = args
# By default, display bitrate instead of cumulative in the network plugin
self.args.network_stats_cumulative = False
......@@ -56,6 +57,7 @@ class glancesCurses:
self.screen = curses.initscr()
if not self.screen:
print(_("Error: Cannot init the curses library.\n"))
sys.exit(1)
# Set curses options
if hasattr(curses, 'start_color'):
......
......@@ -58,9 +58,7 @@ class Plugin(GlancesPlugin):
"""
# Grab CPU using the PSUtil cpu_times_percent method
# !!! the first time this function is called with interval = 0.0 or None
# !!! it will return a meaningless 0.0 value which you are supposed to ignore
cputimespercent = cpu_times_percent(interval=0, percpu=False)
cputimespercent = cpu_times_percent(interval=0.0, percpu=False)
# Get all possible value for CPU stats
# user
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册