vmstat 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/vmstat/procfs.rb +1 -1
- data/lib/vmstat/version.rb +1 -1
- data/spec/procfs/stat +1 -1
- data/spec/vmstat/procfs_spec.rb +12 -8
- data/spec/vmstat/snapshot_spec.rb +3 -1
- data/spec/vmstat/solaris_spec.rb +4 -2
- data/spec/vmstat/task_spec.rb +2 -1
- data/vmstat.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d77a479676667732658bffbc383e7f08126194e
|
4
|
+
data.tar.gz: 2e9ba271cb534a4e28c8c0ddee82f924f239b192
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b246e0c49c11135483838d95efcd40eeb35336ab22c8df356921d233dadf2b6063746648e2d201a08d732fe860b3a77707913f76ab6348c92b3d3f859d759cf
|
7
|
+
data.tar.gz: 2e17039e4ca2b48f4f5668251c1b2a29389d96a68e9ef73c0961d12c9bd7ac3daab8521935a5e1bddb2f90f5f0d4bca7b9158e58b3f6b1ed36e7e89a59c1b294
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.4
|
data/lib/vmstat/procfs.rb
CHANGED
@@ -15,7 +15,7 @@ module Vmstat
|
|
15
15
|
# Since Linux 2.6.24:
|
16
16
|
# guest - which is the time spent running a virtual CPU for guest
|
17
17
|
# operating systems under the control of the Linux kernel.
|
18
|
-
CPU_DATA = /cpu(\d)#{'\s+(\d+)' * 4}/.freeze
|
18
|
+
CPU_DATA = /cpu(\d+)#{'\s+(\d+)' * 4}/.freeze
|
19
19
|
|
20
20
|
# Grep the network stats from the procfs.
|
21
21
|
# @example Format (from /proc/net/dev)
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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
7
7
|
ctxt 29527
|
8
8
|
btime 1349885697
|
data/spec/vmstat/procfs_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Vmstat::ProcFS do
|
|
21
21
|
Vmstat::Cpu.new(0, 311, 966, 0, 26788),
|
22
22
|
Vmstat::Cpu.new(1, 351, 862, 0, 27263),
|
23
23
|
Vmstat::Cpu.new(2, 324, 1092, 0, 26698),
|
24
|
-
Vmstat::Cpu.new(
|
24
|
+
Vmstat::Cpu.new(30, 326, 838, 0, 27581)
|
25
25
|
]
|
26
26
|
end
|
27
27
|
end
|
@@ -30,13 +30,15 @@ describe Vmstat::ProcFS do
|
|
30
30
|
subject { procfs.memory }
|
31
31
|
|
32
32
|
it { should be_a(Vmstat::Memory) }
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
if `getconf PAGESIZE`.chomp.to_i == 4096
|
34
|
+
it do
|
35
|
+
should == Vmstat::Memory.new(4096, 4906, 6508, 8405, 107017, 64599, 1104)
|
36
|
+
end
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
it "should have the right total" do
|
39
|
+
(subject.wired_bytes + subject.active_bytes +
|
40
|
+
subject.inactive_bytes + subject.free_bytes).should == 507344 * 1024
|
41
|
+
end
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
@@ -67,6 +69,8 @@ describe Vmstat::ProcFS do
|
|
67
69
|
subject { procfs.task }
|
68
70
|
|
69
71
|
it { should be_a(Vmstat::Task) }
|
70
|
-
|
72
|
+
if `getconf PAGESIZE`.chomp.to_i == 4096
|
73
|
+
it { should == Vmstat::Task.new(4807, 515, 2000, 0) }
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
@@ -28,7 +28,9 @@ describe Vmstat::Snapshot do
|
|
28
28
|
its(:load_average) { should be_a(Vmstat::LoadAverage) }
|
29
29
|
its(:memory) { should be_a(Vmstat::Memory) }
|
30
30
|
its(:network_interfaces) { should be_a(Array) }
|
31
|
-
|
31
|
+
if RUBY_PLATFORM =~ /darwin|linux/
|
32
|
+
its(:task) { should be_a(Vmstat::Task) }
|
33
|
+
end
|
32
34
|
|
33
35
|
context "first of cpu" do
|
34
36
|
subject { snapshot.cpus.first }
|
data/spec/vmstat/solaris_spec.rb
CHANGED
@@ -249,8 +249,10 @@ link:0:e1000g0:obytes64 2000\n"
|
|
249
249
|
subject { solaris.memory }
|
250
250
|
|
251
251
|
it { should be_a(Vmstat::Memory) }
|
252
|
-
|
253
|
-
|
252
|
+
if `getconf PAGESIZE`.chomp.to_i == 4096
|
253
|
+
it do
|
254
|
+
should == Vmstat::Memory.new(4096, 409145, 9018, 0, 61103, 0, 0)
|
255
|
+
end
|
254
256
|
end
|
255
257
|
end
|
256
258
|
|
data/spec/vmstat/task_spec.rb
CHANGED
data/vmstat.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.extensions = ["ext/vmstat/extconf.rb"]
|
23
23
|
|
24
24
|
gem.add_development_dependency('rake')
|
25
|
-
gem.add_development_dependency('rspec', "~> 2.9
|
25
|
+
gem.add_development_dependency('rspec', "~> 2.9")
|
26
26
|
gem.add_development_dependency('rake-compiler')
|
27
27
|
gem.add_development_dependency('guard-rspec')
|
28
28
|
gem.add_development_dependency('timecop')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmstat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Landgraf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.9
|
33
|
+
version: '2.9'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.9
|
40
|
+
version: '2.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.4
|
163
|
+
rubygems_version: 2.6.4
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: A focused and fast library to gather system information
|