monitoring-client 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/monitor-system-info +23 -0
- data/lib/monitoring/client/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/bin/monitor-system-info
CHANGED
@@ -115,6 +115,7 @@ module Monitoring
|
|
115
115
|
while @alive
|
116
116
|
post_load_avg()
|
117
117
|
post_mem_info()
|
118
|
+
post_iostat()
|
118
119
|
Kernel.sleep(@sleep_period)
|
119
120
|
end
|
120
121
|
end
|
@@ -174,6 +175,28 @@ module Monitoring
|
|
174
175
|
end
|
175
176
|
end
|
176
177
|
end
|
178
|
+
|
179
|
+
def post_iostat
|
180
|
+
iostat = %x(iostat -dx).split("\n").slice(3..-1)
|
181
|
+
capture_float = /(?:\s+(\d+\.\d+))/
|
182
|
+
iostat.each do |device_stat|
|
183
|
+
if (m = device_stat.match(/^(\w+)#{capture_float.to_s * 11}/))
|
184
|
+
routine("iostat.#{m[1]}") do |i|
|
185
|
+
i.count("rrqm/s", Float(m[2]), "ops/seconds")
|
186
|
+
i.count("wrqm/s", Float(m[3]), "ops/seconds")
|
187
|
+
i.count("r/s", Float(m[4]), "ops/seconds")
|
188
|
+
i.count("w/s", Float(m[5]), "ops/seconds")
|
189
|
+
i.count("rsec/s", Float(m[6]), "ops/seconds")
|
190
|
+
i.count("wsec/s", Float(m[7]), "ops/seconds")
|
191
|
+
i.count("avgrq-sz", Float(m[8]), "n")
|
192
|
+
i.count("avgqu-sz", Float(m[9]), "n")
|
193
|
+
i.count("await", Float(m[10]), "milliseconds")
|
194
|
+
i.count("svctm", Float(m[11]), "milliseconds")
|
195
|
+
i.count("%util", Float(m[12]), "%")
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
177
200
|
end
|
178
201
|
end
|
179
202
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monitoring-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marc Bowes
|