mirror of https://github.com/nicolargo/glances
Add history to GPU stats. Allowing user to export stats (see #1319)
parent
812db6b76f
commit
6d1c0ccce0
|
@ -71,7 +71,8 @@ class GlancesExport(object):
|
|||
'uptime',
|
||||
'sensors',
|
||||
'docker',
|
||||
'uptime']
|
||||
'uptime',
|
||||
'gpu']
|
||||
|
||||
def load_conf(self, section, mandatories=['host', 'port'], options=None):
|
||||
"""Load the export <section> configuration in the Glances configuration file.
|
||||
|
|
|
@ -249,8 +249,6 @@ class Plugin(GlancesPlugin):
|
|||
# Sort and update the stats
|
||||
self.stats = sort_stats(stats)
|
||||
|
||||
logger.info('Docker stats (sorted): {}'.format(self.stats))
|
||||
|
||||
return self.stats
|
||||
|
||||
def get_docker_cpu(self, container_id, all_stats):
|
||||
|
|
|
@ -32,6 +32,15 @@ except Exception as e:
|
|||
else:
|
||||
import_error_tag = False
|
||||
|
||||
# Define the history items list
|
||||
# All items in this list will be historised if the --enable-history tag is set
|
||||
items_history_list = [{'name': 'proc',
|
||||
'description': 'GPU processor',
|
||||
'y_unit': '%'},
|
||||
{'name': 'mem',
|
||||
'description': 'Memory consumption',
|
||||
'y_unit': '%'}]
|
||||
|
||||
|
||||
class Plugin(GlancesPlugin):
|
||||
"""Glances GPU plugin (limited to NVIDIA chipsets).
|
||||
|
|
Loading…
Reference in New Issue