mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-26 10:42:29 +03:00
No problem on run...
This commit is contained in:
parent
e0bbd65b4d
commit
be2ddb1a84
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user