mirror of https://github.com/nicolargo/glances.git
Set the dafault refresh rate of system stats to 60 seconds
This commit is contained in:
parent
b85c1aba82
commit
99814a8ca8
|
|
@ -44,6 +44,14 @@ swap_careful=50
|
|||
swap_warning=70
|
||||
swap_critical=90
|
||||
|
||||
[system]
|
||||
# This plugin display the first line in the Glances UI with:
|
||||
# Hostname / Operating system name / Architecture information
|
||||
# Set to true to disable a plugin
|
||||
disable=False
|
||||
# Default refresh rate is 60 seconds
|
||||
#refresh=60
|
||||
|
||||
[cpu]
|
||||
disable=False
|
||||
# See https://scoutapm.com/blog/slow_server_flow_chart
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import sys
|
|||
# Global name
|
||||
# Version should start and end with a numerical char
|
||||
# See https://packaging.python.org/specifications/core-metadata/#version
|
||||
__version__ = '3.1.8b7'
|
||||
__version__ = '3.1.8b8'
|
||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||
__license__ = 'LGPLv3'
|
||||
|
||||
|
|
|
|||
|
|
@ -587,6 +587,10 @@ class GlancesPlugin(object):
|
|||
"""Set the limits to input_limits."""
|
||||
self._limits = input_limits
|
||||
|
||||
def set_limits(self, item, value):
|
||||
"""Return the limits object."""
|
||||
self._limits[item] = value
|
||||
|
||||
def get_limits(self, item=None):
|
||||
"""Return the limits object."""
|
||||
if item is None:
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@ class Plugin(GlancesPlugin):
|
|||
# We want to display the stat in the curse interface
|
||||
self.display_curse = True
|
||||
|
||||
# Set default rate to 60 seconds
|
||||
if self.get_limits('refresh') is None:
|
||||
self.set_limits('refresh', 60)
|
||||
|
||||
@GlancesPlugin._check_decorator
|
||||
@GlancesPlugin._log_result_decorator
|
||||
def update(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue