sensu-plugins-nvidia 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -3
- data/README.md +41 -7
- data/bin/metrics-nvidia.rb +14 -5
- data/lib/sensu-plugins-nvidia/version.rb +2 -2
- metadata +13 -35
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8feb1b24be81c238ef88cf3f2c0e9d51743bc0ba
|
4
|
+
data.tar.gz: beb8a259ed77ad254fff31487a400b34a266e2b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c5871a256bab3115e757825d1d12f8fbacc19eabacd0bc8a7afb712d1faf7caea35b28a6c2829918073963074594ba6f92677418d4216e3b910b8b3f1a5fded
|
7
|
+
data.tar.gz: 96a3ee9df9592bca5e6a75fd51570357149cf8c5345688d7eac0f01fede656cd05f4304cd01ab545a310bfd07b57c3f59526d314e639243a51ad758a8965eb04
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,30 @@
|
|
1
|
-
#Change Log
|
1
|
+
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
## Unreleased]
|
6
|
+
## [Unreleased]
|
7
|
+
|
8
|
+
## [1.0.0] - 2017-02-21
|
9
|
+
### Added
|
10
|
+
- add metrics for `utilization.gpu`, `utilization.memory` (in percent) (@GhostLyrics)
|
11
|
+
- add metric for `power.draw` (in Watts) (@GhostLyrics)
|
12
|
+
- support for Ruby 2.3 (@eheydrick)
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
- make metrics multi GPU aware (@GhostLyrics)
|
16
|
+
|
17
|
+
### Removed
|
18
|
+
- Support for Ruby < 2.1 (@eheydrick)
|
7
19
|
|
8
20
|
## [0.0.2] - 2015-07-14
|
9
21
|
### Changed
|
10
22
|
- updated sensu-plugin gem to 1.2.0
|
11
23
|
|
12
|
-
##
|
24
|
+
## 0.0.1 - 2015-07-04
|
13
25
|
### Added
|
14
26
|
- initial release
|
27
|
+
|
28
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-nvidia/compare/1.0.0...HEAD
|
29
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-nvidia/compare/0.0.2...1.0.0
|
30
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-nvidia/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -1,21 +1,55 @@
|
|
1
|
-
##
|
1
|
+
## sensu-plugins-nvidia
|
2
2
|
|
3
|
-
[
|
3
|
+
[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-nvidia.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-nvidia)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-nvidia.svg)](http://badge.fury.io/rb/sensu-plugins-nvidia)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nvidia/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nvidia)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nvidia/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-nvidia)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-nvidia.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-nvidia)
|
8
|
-
[ ![Codeship Status for sensu-plugins/sensu-plugins-nvidia](https://codeship.com/projects/a5eee1b0-edc1-0132-1e01-5a51cb58650a/status?branch=master)](https://codeship.com/projects/84109)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
Plugin to collect metrics from your NVIDIA GPU.
|
12
|
+
|
13
|
+
### metrics-nvidia.rb
|
14
|
+
|
15
|
+
Collects metrics by calling `nvidia-smi` internally.
|
16
|
+
|
17
|
+
#### parameters
|
18
|
+
|
19
|
+
- `-s, --scheme`: The scheme to concatenate the metrics with (default: `HOSTNAME.nvidia`)
|
20
|
+
|
21
|
+
#### metrics
|
22
|
+
|
23
|
+
Multiple GPUs are supported and labeled by BusID in Hex (e.g. `nvidia.bus0x02.temperature.gpu`). For each PCI bus you will get the following metrics:
|
24
|
+
|
25
|
+
- `nvidia.busBUS_IN_HEX.fan.speed`: Speed of the card's fan (RPM)
|
26
|
+
- `nvidia.busBUS_IN_HEX.memory.free`: Unused memory available to the card (MiB, mebibyte)
|
27
|
+
- `nvidia.busBUS_IN_HEX.memory.total`: Total amount of memory available to the card (MiB, mebibyte)
|
28
|
+
- `nvidia.busBUS_IN_HEX.memory.used`: Memory used by the card (MiB, mebibyte)
|
29
|
+
- `nvidia.busBUS_IN_HEX.power.draw`: Power draw of the card (Watt)
|
30
|
+
- `nvidia.busBUS_IN_HEX.temperature.gpu`: Temperature of the card (Degree Celsius)
|
31
|
+
- `nvidia.busBUS_IN_HEX.utilization.gpu`: GPU utilization of the card (percent)
|
32
|
+
- `nvidia.busBUS_IN_HEX.utilization.memory`: memory utilization of the card (percent)
|
33
|
+
|
34
|
+
*If you do not get all of the listed values, you GPU probably does not support the feature. To check, you can query it yourself by running* `nvidia-smi --query-gpu=METRIC --format=csv`.
|
35
|
+
(e.g. `nvidia-smi --query-gpu=power.draw --format=csv`)
|
36
|
+
|
14
37
|
|
15
38
|
## Usage
|
16
39
|
|
40
|
+
To collect metrics with the scheme of your choice:
|
41
|
+
|
42
|
+
```plain
|
43
|
+
metrics-nvidia.rb --scheme YOUR_SCHEME_HERE
|
44
|
+
```
|
45
|
+
|
17
46
|
## Installation
|
18
47
|
|
19
|
-
|
48
|
+
```plain
|
49
|
+
sensu-install --plugin sensu-plugins-nvidia
|
50
|
+
```
|
51
|
+
|
52
|
+
In order to use this plugin you will need the official NVIDIA command line interface `nvidia-smi` which is distributed with their drivers.
|
53
|
+
|
54
|
+
For more help see [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html).
|
20
55
|
|
21
|
-
## Notes
|
data/bin/metrics-nvidia.rb
CHANGED
@@ -39,18 +39,27 @@ class EntropyGraphite < Sensu::Plugin::Metric::CLI::Graphite
|
|
39
39
|
default: "#{Socket.gethostname}.nvidia"
|
40
40
|
|
41
41
|
def run
|
42
|
+
# get the slots for labelling multiple GPUs
|
43
|
+
pci_slots = `nvidia-smi --query-gpu=pci.bus --format=csv,noheader`.scan(/^.+$/)
|
44
|
+
|
42
45
|
metrics = {}
|
43
|
-
keys = ['temperature.gpu', 'fan.speed', 'memory.used', 'memory.total', 'memory.free']
|
46
|
+
keys = ['temperature.gpu', 'fan.speed', 'memory.used', 'memory.total', 'memory.free', 'utilization.memory', 'utilization.gpu', 'power.draw']
|
44
47
|
keys.each do |key|
|
45
|
-
metrics[key] = `nvidia-smi --query-gpu=#{key} --format=csv,noheader`.
|
48
|
+
metrics[key] = `nvidia-smi --query-gpu=#{key} --format=csv,noheader`.scan(/\d+\.?\d*/)
|
46
49
|
end
|
47
50
|
|
48
51
|
timestamp = Time.now.to_i
|
49
52
|
|
50
|
-
|
51
|
-
output [config[:scheme], key].join('.'), value, timestamp
|
52
|
-
end
|
53
|
+
# for every unit output every metric
|
53
54
|
|
55
|
+
pci_index = 0
|
56
|
+
|
57
|
+
pci_slots.each do
|
58
|
+
metrics.each do |key, value|
|
59
|
+
output [[config[:scheme], pci_slots[pci_index]].join('.bus'), key].join('.'), value[pci_index], timestamp
|
60
|
+
end
|
61
|
+
pci_index += 1
|
62
|
+
end
|
54
63
|
ok
|
55
64
|
end
|
56
65
|
end
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-nvidia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
|
14
|
-
am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
|
15
|
-
A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
|
16
|
-
CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
|
17
|
-
LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
|
18
|
-
CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
|
19
|
-
zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
|
20
|
-
qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
|
21
|
-
k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
|
22
|
-
oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
|
23
|
-
0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
|
24
|
-
HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
|
25
|
-
QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
|
26
|
-
MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
|
27
|
-
rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
|
28
|
-
UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
|
29
|
-
JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
|
30
|
-
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
|
-
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2015-07-14 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: sensu-plugin
|
37
15
|
requirement: !ruby/object:Gem::Requirement
|
38
16
|
requirements:
|
39
|
-
- -
|
17
|
+
- - "~>"
|
40
18
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.2
|
19
|
+
version: '1.2'
|
42
20
|
type: :runtime
|
43
21
|
prerelease: false
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
45
23
|
requirements:
|
46
|
-
- -
|
24
|
+
- - "~>"
|
47
25
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.2
|
26
|
+
version: '1.2'
|
49
27
|
- !ruby/object:Gem::Dependency
|
50
28
|
name: bundler
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,16 +84,16 @@ dependencies:
|
|
106
84
|
name: rubocop
|
107
85
|
requirement: !ruby/object:Gem::Requirement
|
108
86
|
requirements:
|
109
|
-
- -
|
87
|
+
- - "~>"
|
110
88
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
89
|
+
version: 0.40.0
|
112
90
|
type: :development
|
113
91
|
prerelease: false
|
114
92
|
version_requirements: !ruby/object:Gem::Requirement
|
115
93
|
requirements:
|
116
|
-
- -
|
94
|
+
- - "~>"
|
117
95
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
96
|
+
version: 0.40.0
|
119
97
|
- !ruby/object:Gem::Dependency
|
120
98
|
name: rspec
|
121
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
181
|
requirements:
|
204
182
|
- - ">="
|
205
183
|
- !ruby/object:Gem::Version
|
206
|
-
version: 1
|
184
|
+
version: '2.1'
|
207
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
186
|
requirements:
|
209
187
|
- - ">="
|
@@ -211,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
189
|
version: '0'
|
212
190
|
requirements: []
|
213
191
|
rubyforge_project:
|
214
|
-
rubygems_version: 2.4.
|
192
|
+
rubygems_version: 2.4.5
|
215
193
|
signing_key:
|
216
194
|
specification_version: 4
|
217
195
|
summary: Sensu plugins for nvidia
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|