sys-proctable 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES.rdoc +6 -0
- data/lib/linux/sys/proctable.rb +2 -1
- data/lib/sys/proctable/version.rb +1 -1
- data/spec/sys_proctable_all_spec.rb +2 -1
- data/spec/sys_proctable_linux_spec.rb +18 -5
- data/sys-proctable.gemspec +2 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c36a4455aa4fd0172d51e7e1e69b69c180a86da3570247c6958c2bdee34a314
|
4
|
+
data.tar.gz: 2659ffc977988520db6d68703efa079815d966fd0320679c8cc961a75daf3f13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a101a16b5c3a767917fc2f4e32633f20785a9d678c46f6def07aabc3d5392238bfe8b48a73f203f607a161c1908f0e412e73f5b2a6c92a56c16c8e65c72594
|
7
|
+
data.tar.gz: c372c2763018d53376e11aaaa8004071eff144dfd3830c1fb15dbfcc4f35316a2870b1519d0a77613a3465e31bcca0da9f0397dba0c1bfaf1e0e9b0649029a04
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES.rdoc
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 1.2.4 - 18-Jun-2020
|
2
|
+
* Added the num_threads field for Linux. This was originally a dead field in
|
3
|
+
older versions of Linux that was skipped, but as of Linux 2.6+ it actually
|
4
|
+
holds meaningful data.
|
5
|
+
* Updated the specs for Linux.
|
6
|
+
|
1
7
|
== 1.2.3 - 17-Mar-2020
|
2
8
|
* Properly include a copy of Apache-2.0 in LICENSE file as part of library.
|
3
9
|
* Add explicit .rdoc extensions to CHANGES and MANIFEST files.
|
data/lib/linux/sys/proctable.rb
CHANGED
@@ -45,6 +45,7 @@ module Sys
|
|
45
45
|
'cstime', # Number of children's kernel mode jiffies
|
46
46
|
'priority', # Nice value plus 15
|
47
47
|
'nice', # Nice value
|
48
|
+
'num_threads', # Number of threads in this process
|
48
49
|
'itrealvalue', # Time in jiffies before next SIGALRM
|
49
50
|
'starttime', # Time in jiffies since system boot
|
50
51
|
'vsize', # Virtual memory size in bytes
|
@@ -216,7 +217,7 @@ module Sys
|
|
216
217
|
struct.cstime = stat[16].to_i
|
217
218
|
struct.priority = stat[17].to_i
|
218
219
|
struct.nice = stat[18].to_i
|
219
|
-
|
220
|
+
struct.num_threads = stat[19].to_i
|
220
221
|
struct.itrealvalue = stat[20].to_i
|
221
222
|
struct.starttime = stat[21].to_i
|
222
223
|
struct.vsize = stat[22].to_i
|
@@ -16,7 +16,8 @@ describe Sys::ProcTable do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "has a VERSION constant set to the expected value" do
|
19
|
-
expect(Sys::ProcTable::VERSION).to eql('1.2.
|
19
|
+
expect(Sys::ProcTable::VERSION).to eql('1.2.4')
|
20
|
+
expect(Sys::ProcTable::VERSION).to be_frozen
|
20
21
|
end
|
21
22
|
|
22
23
|
it "defines a custom error class" do
|
@@ -10,12 +10,12 @@ require_relative 'sys_proctable_all_spec'
|
|
10
10
|
|
11
11
|
describe Sys::ProcTable do
|
12
12
|
let(:fields){ %w[
|
13
|
-
cmdline cwd exe pid name uid euid gid egid comm state ppid pgrp
|
14
|
-
session
|
15
|
-
stime cutime cstime priority nice itrealvalue starttime vsize
|
13
|
+
cmdline cwd environ exe fd root pid name uid euid gid egid comm state ppid pgrp
|
14
|
+
session tty_nr tpgid flags minflt cminflt majflt cmajflt utime
|
15
|
+
stime cutime cstime priority nice num_threads itrealvalue starttime vsize
|
16
16
|
rss rlim startcode endcode startstack kstkesp kstkeip signal blocked
|
17
|
-
sigignore sigcatch wchan nswap cnswap exit_signal processor
|
18
|
-
pctcpu pctmem nlwp cgroup smaps
|
17
|
+
sigignore sigcatch wchan nswap cnswap exit_signal processor rt_priority
|
18
|
+
policy pctcpu pctmem nlwp cgroup smaps
|
19
19
|
]
|
20
20
|
}
|
21
21
|
|
@@ -147,6 +147,11 @@ describe Sys::ProcTable do
|
|
147
147
|
expect(subject.nice).to be_kind_of(Numeric)
|
148
148
|
end
|
149
149
|
|
150
|
+
it "contains a num_threads member and returns the expected value" do
|
151
|
+
expect(subject).to respond_to(:num_threads)
|
152
|
+
expect(subject.num_threads).to be_kind_of(Numeric)
|
153
|
+
end
|
154
|
+
|
150
155
|
it "contains a itrealvalue member and returns the expected value" do
|
151
156
|
expect(subject).to respond_to(:itrealvalue)
|
152
157
|
expect(subject.itrealvalue).to be_kind_of(Numeric)
|
@@ -307,4 +312,12 @@ describe Sys::ProcTable do
|
|
307
312
|
expect(subject.smaps).to be_kind_of(Sys::ProcTable::Smaps)
|
308
313
|
end
|
309
314
|
end
|
315
|
+
|
316
|
+
context "fields" do
|
317
|
+
it "has a fields method that returns the expected results" do
|
318
|
+
expect(described_class).to respond_to(:fields)
|
319
|
+
expect(described_class.fields).to be_kind_of(Array)
|
320
|
+
expect(described_class.fields).to match_array(fields)
|
321
|
+
end
|
322
|
+
end
|
310
323
|
end
|
data/sys-proctable.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'sys-proctable'
|
5
|
-
spec.version = '1.2.
|
5
|
+
spec.version = '1.2.4'
|
6
6
|
spec.author = 'Daniel J. Berger'
|
7
7
|
spec.license = 'Apache-2.0'
|
8
8
|
spec.email = 'djberg96@gmail.com'
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.metadata = {
|
33
33
|
'homepage_uri' => 'https://github.com/djberg96/sys-proctable',
|
34
34
|
'bug_tracker_uri' => 'https://github.com/djberg96/sys-proctable/issues',
|
35
|
-
'changelog_uri' => 'https://github.com/djberg96/sys-proctable/blob/master/CHANGES',
|
35
|
+
'changelog_uri' => 'https://github.com/djberg96/sys-proctable/blob/master/CHANGES.rdoc',
|
36
36
|
'documentation_uri' => 'https://github.com/djberg96/sys-proctable/wiki',
|
37
37
|
'source_code_uri' => 'https://github.com/djberg96/sys-proctable',
|
38
38
|
'wiki_uri' => 'https://github.com/djberg96/sys-proctable/wiki'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-proctable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -121,7 +121,7 @@ licenses:
|
|
121
121
|
metadata:
|
122
122
|
homepage_uri: https://github.com/djberg96/sys-proctable
|
123
123
|
bug_tracker_uri: https://github.com/djberg96/sys-proctable/issues
|
124
|
-
changelog_uri: https://github.com/djberg96/sys-proctable/blob/master/CHANGES
|
124
|
+
changelog_uri: https://github.com/djberg96/sys-proctable/blob/master/CHANGES.rdoc
|
125
125
|
documentation_uri: https://github.com/djberg96/sys-proctable/wiki
|
126
126
|
source_code_uri: https://github.com/djberg96/sys-proctable
|
127
127
|
wiki_uri: https://github.com/djberg96/sys-proctable/wiki
|
metadata.gz.sig
CHANGED
Binary file
|