diff options
author | 胡玮文 <huww98@outlook.com> | 2019-04-05 15:59:14 +0800 |
---|---|---|
committer | Ilya Mashchenko <ilyamaschenko@gmail.com> | 2019-04-05 10:59:14 +0300 |
commit | 01b91117caecce0d50020a51673b9d3b3b0e01f0 (patch) | |
tree | fb95e138d9d5f497f5efcd97d7939bf5b7092bc9 /collectors/python.d.plugin/python_modules | |
parent | d9d41e6b9e23db9aa48481dd7efa4c317273c9fb (diff) |
Add memory free and per process memory usage to nvidia_smi (#5796)
<!--
Describe the change in summary section, including rationale and degin decisions.
Include "Fixes #nnn" if you are fixing an existing issue.
In "Component Name" section write which component is changed in this PR. This
will help us review your PR quicker.
If you have more information you want to add, write them in "Additional
Information" section. This is usually used to help others understand your
motivation behind this change. A step-by-step reproduction of the problem is
helpful if there is no related issue.
-->
##### Summary
Add memory free
Add per process memory usage
##### Component Name
nvidia_smi
##### Additional Information
Diffstat (limited to 'collectors/python.d.plugin/python_modules')
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/charts.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/charts.py b/collectors/python.d.plugin/python_modules/bases/charts.py index 624f75b6b7..6e78ed6e7c 100644 --- a/collectors/python.d.plugin/python_modules/bases/charts.py +++ b/collectors/python.d.plugin/python_modules/bases/charts.py @@ -200,12 +200,13 @@ class Chart: self.dimensions.append(dim) return dim - def del_dimension(self, dimension_id): + def del_dimension(self, dimension_id, hide=True): if dimension_id not in self: return idx = self.dimensions.index(dimension_id) dimension = self.dimensions[idx] - dimension.params['hidden'] = 'hidden' + if hide: + dimension.params['hidden'] = 'hidden' dimension.params['obsolete'] = 'obsolete' self.create() self.dimensions.remove(dimension) |