linux-kstat 0.2.1-universal-linux → 0.2.6-universal-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0848dc172476fb11e7a128b29b427d098d8cf7e734fe59554508c6c2ebdc8e
4
- data.tar.gz: 64f5d81c6e4e09cfbc5f79125ac5dc826054d3683e070e473cad19a49f17b73d
3
+ metadata.gz: d5fd1d292dd974e197bf8ac06ca71f017e35ab7b98b434b59fa813362a5656f2
4
+ data.tar.gz: 025522376653a48dc026ecb97c8d709e290618c1d117b39409d3cb7aca4baa77
5
5
  SHA512:
6
- metadata.gz: 3c3bda072076e73eb22b90f74e30f53127c7babcb3d8e1387c2d70746335ef8941ab8f92c3dc86321b29ab486550d7acc995b8a5b1ca52cef68d2856cc66ba96
7
- data.tar.gz: 19c855105cd55dd0a0423f74386fcce79cc382d4ca6a7a93144698119388bf6ccf233abf2813476148e3f0e00365838a3187b8e1aece366fdf3771d209d6ee66
6
+ metadata.gz: d8de3c37e3b6d2cf5f6ca39f1c2259446ec7a09f05e9169eff2c4c7db1eee555eeee02c87f4711bc09cde564d0b769553c8b77f914e911936120746274ab8150
7
+ data.tar.gz: ca8949524b8995249dfdb0d85cc7d9a853a14c596c35c6986d08919abf49ddb8ac6e3ec662677cfef85182a8ee19355c0e804a3d6d95e4fc237d5b665a7ad55b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,42 @@
1
+ ## 0.2.6 - 10-Dec-2020
2
+ * Specify an rspec version for the development dependency.
3
+ * Minor updates to gemspec, Rakefile.
4
+
5
+ ## 0.2.5 - 31-Oct-2020
6
+ * Switched from rdoc to markdown since github wasn't rendering rdoc properly.
7
+ * Minor gemspec updates.
8
+
9
+ ## 0.2.4 - 3-Apr-2020
10
+ * Added a LICENSE file as per the Apache license requirements.
11
+
12
+ ## 0.2.3 - 8-Dec-2019
13
+ * Added .rdoc extension to the README, CHANGES and MANIFEST files.
14
+
15
+ ## 0.2.2 - 5-Mar-2019
16
+ * Added the `steal`, `guest` and `guest_nice` attributes for cpu stats.
17
+
18
+ ## 0.2.1 - 25-Jan-2019
19
+ * Fixed license name (missing hyphen).
20
+ * Added metadata to the gemspec.
21
+ * Updated cert, should be good for about 10 years.
22
+
23
+ ## 0.2.0 - 19-Feb-2018
24
+ * Switched license to Apache 2.0.
25
+ * Added a linux-kstat.rb file for convenience.
26
+ * Rakefile now assumes rubygems 2.x.
27
+ * Tests switched to use rspec and development dependencies updated.
28
+ * VERSION constant is now frozen.
29
+ * Some doc updates in the README for bundler.
30
+ * This gem is now signed.
31
+
32
+ ## 0.1.3 - 18-Dec-2014
33
+ * Now properly ignores blank lines. Thanks go to "onlinehead" for the patch.
34
+
35
+ ## 0.1.2 - 2-Nov-2014
36
+ * Updates to the gemspec and Rakefile.
37
+
38
+ ## 0.1.1 - 20-May-2011
39
+ * Set the spec platform to 'universal-linux'.
40
+
41
+ ## 0.1.0 - 10-Feb-2011
42
+ * Initial release.
data/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -1,6 +1,6 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
1
+ * CHANGES.md
2
+ * README.md
3
+ * MANIFEST.md
4
4
  * Rakefile
5
5
  * linux-kstat.gemspec
6
6
  * certs/djberg96_pub.pem
@@ -0,0 +1,63 @@
1
+ ## Description
2
+
3
+ A Ruby library for gathering Linux kernel statistics out of `/proc/stat`.
4
+
5
+ ## Installation
6
+
7
+ `gem install linux-kstat`
8
+
9
+ ### Bundler
10
+
11
+ If you have trouble install this gem via bundler, please try this:
12
+
13
+ `bundle config specific_platform true`
14
+
15
+ Then attempt to install again.
16
+
17
+ ## Synopsis
18
+ ```
19
+ # require 'linux-kstat' will also work
20
+ require 'linux/kstat'
21
+
22
+ kstat = Linux::Kstat.new
23
+
24
+ p kstat[:cpu]
25
+ p kstat[:procs_running]
26
+ ```
27
+
28
+ ## Details
29
+
30
+ The values for most of the keys are a single numeric value. However, in the
31
+ case of "cpu" keys, the result is a 7 element hash of numeric values. In
32
+ the case of the "intr" key, the value is an array containing the list of
33
+ interrupts.
34
+
35
+ ## Information about /proc/stat
36
+
37
+ See http://www.linuxhowtos.org/System/procstat.htm for more information
38
+ about the meaning of each of the fields.
39
+
40
+ ## Known Bugs
41
+
42
+ None known. Please report any bugs on the github project page.
43
+
44
+ http://www.github.com/djberg96/linux-kstat
45
+
46
+ ## License
47
+
48
+ Apache-2.0
49
+
50
+ ## Copyright
51
+
52
+ (C) 2003-2020 Daniel J. Berger
53
+ All Rights Reserved.`
54
+
55
+ ## Warranty
56
+
57
+ This package is provided "as is" and without any express or
58
+ implied warranties, including, without limitation, the implied
59
+ warranties of merchantability and fitness for a particular purpose.
60
+
61
+ ## Author
62
+
63
+ Daniel J. Berger
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ namespace :gem do
10
10
  require 'rubygems/package'
11
11
  spec = eval(IO.read('linux-kstat.gemspec'))
12
12
  spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
- Gem::Package.build(spec, true)
13
+ Gem::Package.build(spec)
14
14
  end
15
15
 
16
16
  desc "Install the linux-kstat gem"
@@ -7,7 +7,7 @@ module Linux
7
7
  extend Forwardable
8
8
 
9
9
  # The version of the linux-kstat library
10
- VERSION = '0.2.1'.freeze
10
+ VERSION = '0.2.6'.freeze
11
11
 
12
12
  # :stopdoc:
13
13
 
@@ -26,13 +26,16 @@ module Linux
26
26
  # kstat = Linux::Kstat.new
27
27
  #
28
28
  # kstat[:cpu] => {
29
- # :idle => 250713454,
30
- # :iowait => 2745691,
31
- # :irq => 39717,
32
- # :softirq => 31323,
33
- # :system => 1881655,
34
- # :nice => 117158,
35
- # :user => 7137418
29
+ # :idle => 250713454,
30
+ # :iowait => 2745691,
31
+ # :irq => 39717,
32
+ # :softirq => 31323,
33
+ # :system => 1881655,
34
+ # :nice => 117158,
35
+ # :user => 7137418,
36
+ # :steal => 0,
37
+ # :guest => 1162987977,
38
+ # :guest_nice => 0
36
39
  # }
37
40
  #
38
41
  # kstat[:processes] # => 1299560
@@ -54,13 +57,16 @@ module Linux
54
57
  unless info.empty?
55
58
  if info.first =~ /^cpu/i
56
59
  hash[info.first.to_sym] = {
57
- :user => info[1].to_i,
58
- :nice => info[2].to_i,
59
- :system => info[3].to_i,
60
- :idle => info[4].to_i,
61
- :iowait => info[5].to_i,
62
- :irq => info[6].to_i,
63
- :softirq => info[7].to_i
60
+ :user => info[1].to_i,
61
+ :nice => info[2].to_i,
62
+ :system => info[3].to_i,
63
+ :idle => info[4].to_i,
64
+ :iowait => info[5].to_i,
65
+ :irq => info[6].to_i,
66
+ :softirq => info[7].to_i,
67
+ :steal => info[8].to_i,
68
+ :guest => info[9].to_i,
69
+ :guest_nice => info[10].to_i
64
70
  }
65
71
  else
66
72
  if info.size > 2
@@ -1,22 +1,19 @@
1
1
  require 'rubygems'
2
- require 'rbconfig'
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.name = 'linux-kstat'
6
- gem.version = '0.2.1'
5
+ gem.version = '0.2.6'
7
6
  gem.license = 'Apache-2.0'
8
7
  gem.author = 'Daniel J. Berger'
9
8
  gem.email = 'djberg96@gmail.com'
10
9
  gem.platform = Gem::Platform.new('universal-linux')
11
10
  gem.homepage = 'https://github.com/djberg96/linux-kstat'
12
11
  gem.summary = 'Ruby interface for Linux kernel stats in /proc/stat'
13
- gem.test_files = Dir['test/test*']
12
+ gem.test_files = Dir['spec/*_spec.rb']
14
13
  gem.files = Dir['**/*'].reject{ |f| f.include?('git') }
15
14
  gem.cert_chain = ['certs/djberg96_pub.pem']
16
15
 
17
- gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
18
-
19
- gem.add_development_dependency('rspec')
16
+ gem.add_development_dependency('rspec', '~> 3.9')
20
17
 
21
18
  gem.metadata = {
22
19
  'homepage_uri' => 'https://github.com/djberg96/linux-kstat',
@@ -11,8 +11,8 @@ describe Linux::Kstat do
11
11
 
12
12
  context "constants" do
13
13
  it "defines a version constant that is set to the expected value" do
14
- expect(Linux::Kstat::VERSION).to eql('0.2.1')
15
- expect(Linux::Kstat::VERSION.frozen?).to be(true)
14
+ expect(Linux::Kstat::VERSION).to eql('0.2.6')
15
+ expect(Linux::Kstat::VERSION).to be_frozen
16
16
  end
17
17
  end
18
18
 
@@ -20,6 +20,7 @@ describe Linux::Kstat do
20
20
  it "allows hash style key access" do
21
21
  expect(subject).to respond_to(:[])
22
22
  expect{ subject[:cpu] }.to_not raise_error
23
+ expect(subject[:cpu].keys.size).to eql(10)
23
24
  end
24
25
 
25
26
  it "contains the expected keys and value types" do
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux-kstat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.6
5
5
  platform: universal-linux
6
6
  authors:
7
7
  - Daniel J. Berger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
@@ -35,46 +35,40 @@ cert_chain:
35
35
  ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
36
  WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date:
38
+ date: 2020-12-10 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rspec
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0'
46
+ version: '3.9'
47
47
  type: :development
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: '3.9'
54
54
  description: |2
55
55
  The linux-kstat library provides a hash style interface for reading
56
56
  Linux kernel statistics read out of /proc/stat.
57
57
  email: djberg96@gmail.com
58
58
  executables: []
59
59
  extensions: []
60
- extra_rdoc_files:
61
- - README
62
- - CHANGES
63
- - MANIFEST
60
+ extra_rdoc_files: []
64
61
  files:
65
- - CHANGES
66
- - README
62
+ - CHANGES.md
63
+ - LICENSE
64
+ - MANIFEST.md
65
+ - README.md
67
66
  - Rakefile
68
- - linux-kstat.gemspec
69
- - MANIFEST
70
- - spec
71
- - spec/linux_kstat_spec.rb
72
- - lib
67
+ - certs/djberg96_pub.pem
73
68
  - lib/linux-kstat.rb
74
- - lib/linux
75
69
  - lib/linux/kstat.rb
76
- - certs
77
- - certs/djberg96_pub.pem
70
+ - linux-kstat.gemspec
71
+ - spec/linux_kstat_spec.rb
78
72
  homepage: https://github.com/djberg96/linux-kstat
79
73
  licenses:
80
74
  - Apache-2.0
@@ -85,7 +79,7 @@ metadata:
85
79
  documentation_uri: https://github.com/djberg96/linux-kstat/wiki
86
80
  source_code_uri: https://github.com/djberg96/linux-kstat
87
81
  wiki_uri: https://github.com/djberg96/linux-kstat/wiki
88
- post_install_message:
82
+ post_install_message:
89
83
  rdoc_options: []
90
84
  require_paths:
91
85
  - lib
@@ -100,8 +94,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
94
  - !ruby/object:Gem::Version
101
95
  version: '0'
102
96
  requirements: []
103
- rubygems_version: 3.0.2
104
- signing_key:
97
+ rubygems_version: 3.0.3
98
+ signing_key:
105
99
  specification_version: 4
106
100
  summary: Ruby interface for Linux kernel stats in /proc/stat
107
- test_files: []
101
+ test_files:
102
+ - spec/linux_kstat_spec.rb
metadata.gz.sig CHANGED
Binary file
data/CHANGES DELETED
@@ -1,25 +0,0 @@
1
- = 0.2.1 - 25-Jan-2019
2
- * Fixed license name (missing hyphen).
3
- * Added metadata to the gemspec.
4
- * Updated cert, should be good for about 10 years.
5
-
6
- = 0.2.0 - 19-Feb-2018
7
- * Switched license to Apache 2.0.
8
- * Added a linux-kstat.rb file for convenience.
9
- * Rakefile now assumes rubygems 2.x.
10
- * Tests switched to use rspec and development dependencies updated.
11
- * VERSION constant is now frozen.
12
- * Some doc updates in the README for bundler.
13
- * This gem is now signed.
14
-
15
- = 0.1.3 - 18-Dec-2014
16
- * Now properly ignores blank lines. Thanks go to "onlinehead" for the patch.
17
-
18
- = 0.1.2 - 2-Nov-2014
19
- * Updates to the gemspec and Rakefile.
20
-
21
- = 0.1.1 - 20-May-2011
22
- * Set the spec platform to 'universal-linux'.
23
-
24
- = 0.1.0 - 10-Feb-2011
25
- * Initial release.
data/README DELETED
@@ -1,52 +0,0 @@
1
- = Description
2
- A Ruby library for gathering Linux kernel statistics out of /proc/stat.
3
-
4
- = Installation
5
- gem install linux-kstat
6
-
7
- = Bundler
8
-
9
- If you have trouble install this gem via bundler, please try this:
10
-
11
- bundle config specific_platform true
12
-
13
- Then attempt to install again.
14
-
15
- = Synopsis
16
- # require 'linux-kstat' will also work
17
- require 'linux/kstat'
18
-
19
- kstat = Linux::Kstat.new
20
-
21
- p kstat[:cpu]
22
- p kstat[:procs_running]
23
-
24
- = Details
25
- The values for most of the keys are a single numeric value. However, in the
26
- case of "cpu" keys, the result is a 7 element hash of numeric values. In
27
- the case of the "intr" key, the value is an array containing the list of
28
- interrupts.
29
-
30
- = Information about /proc/stat
31
- See http://www.linuxhowtos.org/System/procstat.htm for more information
32
- about the meaning of each of the fields.
33
-
34
- = Known Bugs
35
- None known. Please report any bugs on the github project page.
36
-
37
- http://www.github.com/djberg96/linux-kstat
38
-
39
- = License
40
- Apache-2.0
41
-
42
- = Copyright
43
- (C) 2003-2019 Daniel J. Berger
44
- All Rights Reserved.`
45
-
46
- = Warranty
47
- This package is provided "as is" and without any express or
48
- implied warranties, including, without limitation, the implied
49
- warranties of merchantability and fitness for a particular purpose.
50
-
51
- = Author
52
- Daniel J. Berger