server_metrics 1.2.10 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/server_metrics/collectors/disk.rb +8 -0
- data/lib/server_metrics/collectors/network.rb +1 -1
- data/lib/server_metrics/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce6751357cb11a50fb04e0be00dbb8c13ca1361d
|
4
|
+
data.tar.gz: 367228911a31a4080e84e9f8f4df8390d8070d4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8738ebe560ed97c83ae27389a27abdeef0c19d602c65f9e294d5830b8e1e6acfb2015c5108f7d277697d8c3034dee72543b48bf37380afbcc810561842c84c5
|
7
|
+
data.tar.gz: 32630edf7458d70c9f447ebfd3a50bf8830a5375c1d1461e9029e071edcf2bdb8379e1b9ca4bde4131c380d0ceb54ba3c82956c8fb70f3becafadc57753ba5a7
|
data/CHANGELOG.md
CHANGED
@@ -44,6 +44,10 @@ class ServerMetrics::Disk < ServerMetrics::MultiCollector
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
|
+
@devices.each do |device|
|
48
|
+
symlink_name = File.readlink(device[:name]) rescue nil
|
49
|
+
device[:aliases] << symlink_name if symlink_name
|
50
|
+
end
|
47
51
|
end
|
48
52
|
@devices
|
49
53
|
end
|
@@ -98,6 +102,10 @@ class ServerMetrics::Disk < ServerMetrics::MultiCollector
|
|
98
102
|
if ios > 0
|
99
103
|
await = ((stats['ruse'] - old['ruse']) + (stats['wuse'] - old['wuse'])) / ios.to_f
|
100
104
|
|
105
|
+
# FIXME: sometimes calculating await results in a large negative number.
|
106
|
+
# If that happens, just set await to -1.
|
107
|
+
await = -1 if await < 0
|
108
|
+
|
101
109
|
report(device_name, :await => await)
|
102
110
|
end
|
103
111
|
end
|
@@ -9,7 +9,7 @@ class ServerMetrics::Network < ServerMetrics::MultiCollector
|
|
9
9
|
lines.each do |line|
|
10
10
|
iface, rest = line.split(':', 2).collect { |e| e.strip }
|
11
11
|
interfaces << iface
|
12
|
-
next if iface =~
|
12
|
+
next if iface =~ /^(lo|veth\w{4,})$/
|
13
13
|
found = true
|
14
14
|
cols = rest.split(/\s+/)
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: server_metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Lewis
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|