sensu-plugins-process-checks 2.2.0 → 2.3.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 +6 -1
- data/bin/metrics-per-process.py +11 -7
- data/lib/sensu-plugins-process-checks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aab223267b895dbbbce38685a4928b1801d03a8
|
4
|
+
data.tar.gz: 7a45deb3970294cc3f8acaff0c74d8ccda4f9743
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9aeaa218f5a55fd0d6aaee1560af7b68d444dbbc0af440f00a55f77afd2a0beed3d0f87368196b71119d98c6ed1be76aadc4f81a730ac50240dfc2ca65278dc
|
7
|
+
data.tar.gz: 9ae11bfe35a884d635ed38973469b4e3d7a22f7b0277be5fa0c436a5622b0cb6627fc96d02bc9e90a737845698f1dbf04b0ea5d040fdef22dbe0b6fe5609a821
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [2.3.0] - 2017-05-29
|
8
|
+
### Changed
|
9
|
+
- metrics-per-process.py: Use memory_info() in psutil versions greater than 4.0.0, as memory_info_ex() was deprecated.
|
10
|
+
|
7
11
|
## [2.2.0] - 2017-05-28
|
8
12
|
### Changed
|
9
13
|
- metrics-per-process.py: Fallback to importing Counter from backport_collections for Python 2.6 support.
|
@@ -122,7 +126,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
122
126
|
- built against 1.9.3, 2.0, 2.1
|
123
127
|
- cryptographically signed
|
124
128
|
|
125
|
-
[unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.
|
129
|
+
[unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.3.0...HEAD
|
130
|
+
[2.3.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.2.0...2.3.0
|
126
131
|
[2.2.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.1.0...2.2.0
|
127
132
|
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.0.0...2.1.0
|
128
133
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/1.0.0...2.0.0
|
data/bin/metrics-per-process.py
CHANGED
@@ -114,17 +114,21 @@ def stats_per_pid(pid):
|
|
114
114
|
|
115
115
|
stats = {}
|
116
116
|
process_handler = psutil.Process(pid)
|
117
|
+
if psutil.version_info < (4,0,0):
|
118
|
+
process_memory_info = process_handler.memory_info_ex()
|
119
|
+
else:
|
120
|
+
process_memory_info = process_handler.memory_info()
|
117
121
|
stats['cpu.user'] = process_handler.cpu_times().user
|
118
122
|
stats['cpu.system'] = process_handler.cpu_times().system
|
119
123
|
stats['cpu.percent'] = process_handler.cpu_percent()
|
120
124
|
stats['threads'] = process_handler.num_threads()
|
121
|
-
stats['memory.rss'] =
|
122
|
-
stats['memory.vms'] =
|
123
|
-
stats['memory.shared'] =
|
124
|
-
stats['memory.text'] =
|
125
|
-
stats['memory.lib'] =
|
126
|
-
stats['memory.data'] =
|
127
|
-
stats['memory.dirty'] =
|
125
|
+
stats['memory.rss'] = process_memory_info.rss
|
126
|
+
stats['memory.vms'] = process_memory_info.vms
|
127
|
+
stats['memory.shared'] = process_memory_info.shared
|
128
|
+
stats['memory.text'] = process_memory_info.text
|
129
|
+
stats['memory.lib'] = process_memory_info.lib
|
130
|
+
stats['memory.data'] = process_memory_info.data
|
131
|
+
stats['memory.dirty'] = process_memory_info.dirty
|
128
132
|
stats['memory.percent'] = process_handler.memory_percent()
|
129
133
|
stats['fds'] = process_handler.num_fds()
|
130
134
|
stats['ctx_switches.voluntary'] = process_handler.num_ctx_switches().voluntary
|