diff options
author | Pierre Bouchez <89103752+pbouchez@users.noreply.github.com> | 2022-01-12 04:02:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 12:02:01 +0300 |
commit | bd1eaca48699e37ab5cb1ca594b49d79a8c8e98d (patch) | |
tree | 827d891a7bce0ba50b592d712f953a09e5287f9c /collectors/python.d.plugin/nvidia_smi | |
parent | 237cb333953f927335ae76af544f7794fc1acc09 (diff) |
python.d/nvidia_smi: add bar1 chart (#11956)
Diffstat (limited to 'collectors/python.d.plugin/nvidia_smi')
-rw-r--r-- | collectors/python.d.plugin/nvidia_smi/nvidia_smi.chart.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/collectors/python.d.plugin/nvidia_smi/nvidia_smi.chart.py b/collectors/python.d.plugin/nvidia_smi/nvidia_smi.chart.py index 9485e02df5..00bc7884d5 100644 --- a/collectors/python.d.plugin/nvidia_smi/nvidia_smi.chart.py +++ b/collectors/python.d.plugin/nvidia_smi/nvidia_smi.chart.py @@ -28,6 +28,7 @@ GPU_UTIL = 'gpu_utilization' MEM_UTIL = 'mem_utilization' ENCODER_UTIL = 'encoder_utilization' MEM_USAGE = 'mem_usage' +BAR_USAGE = 'bar1_mem_usage' TEMPERATURE = 'temperature' CLOCKS = 'clocks' POWER = 'power' @@ -42,6 +43,7 @@ ORDER = [ MEM_UTIL, ENCODER_UTIL, MEM_USAGE, + BAR_USAGE, TEMPERATURE, CLOCKS, POWER, @@ -95,6 +97,13 @@ def gpu_charts(gpu): ['fb_memory_used', 'used'], ] }, + BAR_USAGE: { + 'options': [None, 'Bar1 Memory Usage', 'MiB', fam, 'nvidia_smi.bar1_memory_usage', 'stacked'], + 'lines': [ + ['bar1_memory_free', 'free'], + ['bar1_memory_used', 'used'], + ] + }, TEMPERATURE: { 'options': [None, 'Temperature', 'celsius', fam, 'nvidia_smi.temperature', 'line'], 'lines': [ @@ -347,6 +356,14 @@ class GPU: return self.root.find('fb_memory_usage').find('free').text.split()[0] @handle_attr_error + def bar1_memory_used(self): + return self.root.find('bar1_memory_usage').find('used').text.split()[0] + + @handle_attr_error + def bar1_memory_free(self): + return self.root.find('bar1_memory_usage').find('free').text.split()[0] + + @handle_attr_error def temperature(self): return self.root.find('temperature').find('gpu_temp').text.split()[0] @@ -401,6 +418,8 @@ class GPU: 'decoder_util': self.decoder_util(), 'fb_memory_used': self.fb_memory_used(), 'fb_memory_free': self.fb_memory_free(), + 'bar1_memory_used': self.bar1_memory_used(), + 'bar1_memory_free': self.bar1_memory_free(), 'gpu_temp': self.temperature(), 'graphics_clock': self.graphics_clock(), 'video_clock': self.video_clock(), |