sys-proctable 1.2.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/{CHANGES.rdoc → CHANGES.md} +69 -49
- data/Gemfile +2 -0
- data/{MANIFEST.rdoc → MANIFEST.md} +9 -1
- data/README.md +9 -3
- data/Rakefile +10 -7
- data/certs/djberg96_pub.pem +26 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/constants.rb +11 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/functions.rb +14 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/structs.rb +298 -0
- data/lib/bsd/sys/dragonfly/sys/proctable.rb +175 -0
- data/lib/bsd/sys/freebsd/sys/proctable/constants.rb +0 -0
- data/lib/bsd/sys/freebsd/sys/proctable/functions.rb +0 -0
- data/lib/bsd/sys/freebsd/sys/proctable/structs.rb +0 -0
- data/lib/{freebsd → bsd/sys/freebsd}/sys/proctable.rb +1 -1
- data/lib/bsd/sys/proctable.rb +8 -0
- data/lib/darwin/sys/proctable.rb +53 -20
- data/lib/linux/sys/proctable/cgroup_entry.rb +4 -2
- data/lib/linux/sys/proctable/smaps.rb +29 -17
- data/lib/linux/sys/proctable.rb +41 -35
- data/lib/sunos/sys/proctable.rb +2 -2
- data/lib/sys/proctable/version.rb +1 -1
- data/lib/sys/proctable.rb +2 -2
- data/lib/sys/top.rb +7 -2
- data/lib/windows/sys/proctable.rb +36 -32
- data/spec/spec_helper.rb +15 -0
- data/spec/sys_proctable_aix_spec.rb +74 -76
- data/spec/sys_proctable_all_spec.rb +45 -45
- data/spec/sys_proctable_bsd_spec.rb +244 -0
- data/spec/sys_proctable_darwin_spec.rb +85 -58
- data/spec/sys_proctable_linux_spec.rb +196 -195
- data/spec/sys_proctable_sunos_spec.rb +190 -192
- data/spec/sys_proctable_windows_spec.rb +153 -153
- data/spec/sys_top_spec.rb +20 -21
- data/sys-proctable.gemspec +16 -24
- data.tar.gz.sig +0 -0
- metadata +78 -18
- metadata.gz.sig +0 -0
- data/spec/sys_proctable_freebsd_spec.rb +0 -210
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -35,16 +35,44 @@ cert_chain:
|
|
35
35
|
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
36
36
|
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2022-12-26 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: ffi
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.1'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rspec
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.9'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.9'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rake
|
42
70
|
requirement: !ruby/object:Gem::Requirement
|
43
71
|
requirements:
|
44
72
|
- - ">="
|
45
73
|
- !ruby/object:Gem::Version
|
46
74
|
version: '0'
|
47
|
-
type: :
|
75
|
+
type: :development
|
48
76
|
prerelease: false
|
49
77
|
version_requirements: !ruby/object:Gem::Requirement
|
50
78
|
requirements:
|
@@ -52,7 +80,7 @@ dependencies:
|
|
52
80
|
- !ruby/object:Gem::Version
|
53
81
|
version: '0'
|
54
82
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
83
|
+
name: rubocop
|
56
84
|
requirement: !ruby/object:Gem::Requirement
|
57
85
|
requirements:
|
58
86
|
- - ">="
|
@@ -66,7 +94,21 @@ dependencies:
|
|
66
94
|
- !ruby/object:Gem::Version
|
67
95
|
version: '0'
|
68
96
|
- !ruby/object:Gem::Dependency
|
69
|
-
name:
|
97
|
+
name: rubocop-rspec
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: mkmf-lite
|
70
112
|
requirement: !ruby/object:Gem::Requirement
|
71
113
|
requirements:
|
72
114
|
- - ">="
|
@@ -88,17 +130,29 @@ description: |2
|
|
88
130
|
email: djberg96@gmail.com
|
89
131
|
executables: []
|
90
132
|
extensions: []
|
91
|
-
extra_rdoc_files:
|
92
|
-
- CHANGES.rdoc
|
93
|
-
- README.md
|
94
|
-
- MANIFEST.rdoc
|
133
|
+
extra_rdoc_files: []
|
95
134
|
files:
|
135
|
+
- CHANGES.md
|
136
|
+
- Gemfile
|
137
|
+
- LICENSE
|
138
|
+
- MANIFEST.md
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
96
141
|
- benchmarks/bench_ips_ps.rb
|
97
142
|
- benchmarks/bench_ps.rb
|
143
|
+
- certs/djberg96_pub.pem
|
98
144
|
- examples/example_ps.rb
|
99
145
|
- lib/aix/sys/proctable.rb
|
146
|
+
- lib/bsd/sys/dragonfly/sys/proctable.rb
|
147
|
+
- lib/bsd/sys/dragonfly/sys/proctable/constants.rb
|
148
|
+
- lib/bsd/sys/dragonfly/sys/proctable/functions.rb
|
149
|
+
- lib/bsd/sys/dragonfly/sys/proctable/structs.rb
|
150
|
+
- lib/bsd/sys/freebsd/sys/proctable.rb
|
151
|
+
- lib/bsd/sys/freebsd/sys/proctable/constants.rb
|
152
|
+
- lib/bsd/sys/freebsd/sys/proctable/functions.rb
|
153
|
+
- lib/bsd/sys/freebsd/sys/proctable/structs.rb
|
154
|
+
- lib/bsd/sys/proctable.rb
|
100
155
|
- lib/darwin/sys/proctable.rb
|
101
|
-
- lib/freebsd/sys/proctable.rb
|
102
156
|
- lib/linux/sys/proctable.rb
|
103
157
|
- lib/linux/sys/proctable/cgroup_entry.rb
|
104
158
|
- lib/linux/sys/proctable/smaps.rb
|
@@ -109,11 +163,15 @@ files:
|
|
109
163
|
- lib/sys/proctable/version.rb
|
110
164
|
- lib/sys/top.rb
|
111
165
|
- lib/windows/sys/proctable.rb
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
- spec/sys_proctable_aix_spec.rb
|
168
|
+
- spec/sys_proctable_all_spec.rb
|
169
|
+
- spec/sys_proctable_bsd_spec.rb
|
170
|
+
- spec/sys_proctable_darwin_spec.rb
|
171
|
+
- spec/sys_proctable_linux_spec.rb
|
172
|
+
- spec/sys_proctable_sunos_spec.rb
|
173
|
+
- spec/sys_proctable_windows_spec.rb
|
174
|
+
- spec/sys_top_spec.rb
|
117
175
|
- sys-proctable.gemspec
|
118
176
|
homepage: http://github.com/djberg96/sys-proctable
|
119
177
|
licenses:
|
@@ -121,10 +179,11 @@ licenses:
|
|
121
179
|
metadata:
|
122
180
|
homepage_uri: https://github.com/djberg96/sys-proctable
|
123
181
|
bug_tracker_uri: https://github.com/djberg96/sys-proctable/issues
|
124
|
-
changelog_uri: https://github.com/djberg96/sys-proctable/blob/
|
182
|
+
changelog_uri: https://github.com/djberg96/sys-proctable/blob/main/CHANGES.md
|
125
183
|
documentation_uri: https://github.com/djberg96/sys-proctable/wiki
|
126
184
|
source_code_uri: https://github.com/djberg96/sys-proctable
|
127
185
|
wiki_uri: https://github.com/djberg96/sys-proctable/wiki
|
186
|
+
rubygems_mfa_required: 'true'
|
128
187
|
post_install_message:
|
129
188
|
rdoc_options: []
|
130
189
|
require_paths:
|
@@ -140,15 +199,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
199
|
- !ruby/object:Gem::Version
|
141
200
|
version: '0'
|
142
201
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
202
|
+
rubygems_version: 3.3.26
|
144
203
|
signing_key:
|
145
204
|
specification_version: 4
|
146
205
|
summary: An interface for providing process table information
|
147
206
|
test_files:
|
207
|
+
- spec/spec_helper.rb
|
148
208
|
- spec/sys_proctable_aix_spec.rb
|
149
209
|
- spec/sys_proctable_all_spec.rb
|
210
|
+
- spec/sys_proctable_bsd_spec.rb
|
150
211
|
- spec/sys_proctable_darwin_spec.rb
|
151
|
-
- spec/sys_proctable_freebsd_spec.rb
|
152
212
|
- spec/sys_proctable_linux_spec.rb
|
153
213
|
- spec/sys_proctable_sunos_spec.rb
|
154
214
|
- spec/sys_proctable_windows_spec.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,210 +0,0 @@
|
|
1
|
-
################################################################
|
2
|
-
# sys_proctable_freebsd_rspec.rb
|
3
|
-
#
|
4
|
-
# Test suite for FreeBSD for the sys-proctable library.
|
5
|
-
# You should run these tests via 'rake test'.
|
6
|
-
################################################################
|
7
|
-
require 'rspec'
|
8
|
-
require 'sys/proctable'
|
9
|
-
require_relative 'sys_proctable_all_spec'
|
10
|
-
|
11
|
-
describe Sys::ProcTable do
|
12
|
-
let(:fields){
|
13
|
-
%w[
|
14
|
-
pid ppid pgid tpgid sid tsid jobc uid ruid rgid
|
15
|
-
ngroups groups size rssize swrss tsize dsize ssize
|
16
|
-
xstat acflag pctcpu estcpu slptime swtime runtime start
|
17
|
-
flag state nice lock rqindex oncpu lastcpu wmesg login
|
18
|
-
lockname comm ttynum ttydev jid priority usrpri cmdline
|
19
|
-
utime stime maxrss ixrss idrss isrss minflt majflt nswap
|
20
|
-
inblock oublock msgsnd msgrcv nsignals nvcsw nivcsw
|
21
|
-
]
|
22
|
-
}
|
23
|
-
|
24
|
-
context "fields singleton method" do
|
25
|
-
it "responds to a fields method" do
|
26
|
-
expect(described_class).to respond_to(:fields)
|
27
|
-
end
|
28
|
-
|
29
|
-
it "returns the expected results for the fields method" do
|
30
|
-
expect(described_class.fields).to be_kind_of(Array)
|
31
|
-
expect(described_class.fields).to eql(fields)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context "ProcTable::Struct members" do
|
36
|
-
subject { described_class.ps(pid: Process.pid) }
|
37
|
-
|
38
|
-
it "contains a pid member and returns the expected value" do
|
39
|
-
expect(subject).to respond_to(:pid)
|
40
|
-
expect(subject.pid).to be_kind_of(Numeric)
|
41
|
-
expect(subject.pid).to eql(Process.pid)
|
42
|
-
end
|
43
|
-
|
44
|
-
it "contains a ppid member and returns the expected value" do
|
45
|
-
expect(subject).to respond_to(:ppid)
|
46
|
-
expect(subject.ppid).to be_kind_of(Fixnum)
|
47
|
-
end
|
48
|
-
|
49
|
-
it "contains a pgid member and returns the expected value" do
|
50
|
-
expect(subject).to respond_to(:pgid)
|
51
|
-
expect(subject.pgid).to be_kind_of(Fixnum)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "contains a ruid member and returns the expected value" do
|
55
|
-
expect(subject).to respond_to(:ruid)
|
56
|
-
expect(subject.ruid).to be_kind_of(Fixnum)
|
57
|
-
end
|
58
|
-
|
59
|
-
it "contains a rgid member and returns the expected value" do
|
60
|
-
expect(subject).to respond_to(:rgid)
|
61
|
-
expect(subject.rgid).to be_kind_of(Fixnum)
|
62
|
-
end
|
63
|
-
|
64
|
-
it "contains a comm member and returns the expected value" do
|
65
|
-
expect(subject).to respond_to(:comm)
|
66
|
-
expect(subject.comm).to be_kind_of(String)
|
67
|
-
end
|
68
|
-
|
69
|
-
it "contains a state member and returns the expected value" do
|
70
|
-
expect(subject).to respond_to(:state)
|
71
|
-
expect(subject.state).to be_kind_of(String)
|
72
|
-
end
|
73
|
-
|
74
|
-
it "contains a pctcpu member and returns the expected value" do
|
75
|
-
expect(subject).to respond_to(:pctcpu)
|
76
|
-
expect(subject.pctcpu).to be_kind_of(Float)
|
77
|
-
end
|
78
|
-
|
79
|
-
it "contains a oncpu member and returns the expected value" do
|
80
|
-
expect(subject).to respond_to(:oncpu)
|
81
|
-
expect(subject.oncpu).to be_kind_of(Fixnum)
|
82
|
-
end
|
83
|
-
|
84
|
-
it "contains a ttynum member and returns the expected value" do
|
85
|
-
expect(subject).to respond_to(:ttynum)
|
86
|
-
expect(subject.ttynum).to be_kind_of(Fixnum)
|
87
|
-
end
|
88
|
-
|
89
|
-
it "contains a ttydev member and returns the expected value" do
|
90
|
-
expect(subject).to respond_to(:ttydev)
|
91
|
-
expect(subject.ttydev).to be_kind_of(String)
|
92
|
-
end
|
93
|
-
|
94
|
-
it "contains a wmesg member and returns the expected value" do
|
95
|
-
expect(subject).to respond_to(:wmesg)
|
96
|
-
expect(subject.wmesg).to be_kind_of(String)
|
97
|
-
end
|
98
|
-
|
99
|
-
it "contains a runtime member and returns the expected value" do
|
100
|
-
expect(subject).to respond_to(:runtime)
|
101
|
-
expect(subject.runtime).to be_kind_of(Fixnum)
|
102
|
-
end
|
103
|
-
|
104
|
-
it "contains a priority member and returns the expected value" do
|
105
|
-
expect(subject).to respond_to(:priority)
|
106
|
-
expect(subject.priority).to be_kind_of(Fixnum)
|
107
|
-
end
|
108
|
-
|
109
|
-
it "contains a usrpri member and returns the expected value" do
|
110
|
-
expect(subject).to respond_to(:usrpri)
|
111
|
-
expect(subject.usrpri).to be_kind_of(Fixnum)
|
112
|
-
end
|
113
|
-
|
114
|
-
it "contains a nice member and returns the expected value" do
|
115
|
-
expect(subject).to respond_to(:nice)
|
116
|
-
expect(subject.nice).to be_kind_of(Fixnum)
|
117
|
-
end
|
118
|
-
|
119
|
-
it "contains a cmdline member and returns the expected value" do
|
120
|
-
expect(subject).to respond_to(:cmdline)
|
121
|
-
expect(subject.cmdline).to be_kind_of(String)
|
122
|
-
end
|
123
|
-
|
124
|
-
it "contains a start member and returns the expected value" do
|
125
|
-
expect(subject).to respond_to(:start)
|
126
|
-
expect(subject.start).to be_kind_of(Time)
|
127
|
-
end
|
128
|
-
|
129
|
-
it "contains a maxrss member and returns the expected value" do
|
130
|
-
expect(subject).to respond_to(:maxrss)
|
131
|
-
expect(subject.maxrss).to be_kind_of(Fixnum)
|
132
|
-
end
|
133
|
-
|
134
|
-
it "contains a ixrss member and returns the expected value" do
|
135
|
-
expect(subject).to respond_to(:ixrss)
|
136
|
-
expect(subject.ixrss).to be_kind_of(Fixnum)
|
137
|
-
end
|
138
|
-
|
139
|
-
# TODO: The value returned on PC BSD 10 does not appear to be valid. Investigate.
|
140
|
-
it "contains a idrss member and returns the expected value" do
|
141
|
-
expect(subject).to respond_to(:idrss)
|
142
|
-
expect(subject.idrss).to be_kind_of(Numeric)
|
143
|
-
end
|
144
|
-
|
145
|
-
it "contains a isrss member and returns the expected value" do
|
146
|
-
expect(subject).to respond_to(:isrss)
|
147
|
-
expect(subject.isrss).to be_kind_of(Fixnum)
|
148
|
-
end
|
149
|
-
|
150
|
-
it "contains a minflt member and returns the expected value" do
|
151
|
-
expect(subject).to respond_to(:minflt)
|
152
|
-
expect(subject.minflt).to be_kind_of(Fixnum)
|
153
|
-
end
|
154
|
-
|
155
|
-
it "contains a majflt member and returns the expected value" do
|
156
|
-
expect(subject).to respond_to(:majflt)
|
157
|
-
expect(subject.majflt).to be_kind_of(Fixnum)
|
158
|
-
end
|
159
|
-
|
160
|
-
it "contains a nswap member and returns the expected value" do
|
161
|
-
expect(subject).to respond_to(:nswap)
|
162
|
-
expect(subject.nswap).to be_kind_of(Fixnum)
|
163
|
-
end
|
164
|
-
|
165
|
-
it "contains a inblock member and returns the expected value" do
|
166
|
-
expect(subject).to respond_to(:inblock)
|
167
|
-
expect(subject.inblock).to be_kind_of(Fixnum)
|
168
|
-
end
|
169
|
-
|
170
|
-
it "contains a oublock member and returns the expected value" do
|
171
|
-
expect(subject).to respond_to(:oublock)
|
172
|
-
expect(subject.oublock).to be_kind_of(Fixnum)
|
173
|
-
end
|
174
|
-
|
175
|
-
it "contains a msgsnd member and returns the expected value" do
|
176
|
-
expect(subject).to respond_to(:msgsnd)
|
177
|
-
expect(subject.msgsnd).to be_kind_of(Fixnum)
|
178
|
-
end
|
179
|
-
|
180
|
-
it "contains a msgrcv member and returns the expected value" do
|
181
|
-
expect(subject).to respond_to(:msgrcv)
|
182
|
-
expect(subject.msgrcv).to be_kind_of(Fixnum)
|
183
|
-
end
|
184
|
-
|
185
|
-
it "contains a nsignals member and returns the expected value" do
|
186
|
-
expect(subject).to respond_to(:nsignals)
|
187
|
-
expect(subject.nsignals).to be_kind_of(Fixnum)
|
188
|
-
end
|
189
|
-
|
190
|
-
it "contains a nvcsw member and returns the expected value" do
|
191
|
-
expect(subject).to respond_to(:nvcsw)
|
192
|
-
expect(subject.nvcsw).to be_kind_of(Fixnum)
|
193
|
-
end
|
194
|
-
|
195
|
-
it "contains a nivcsw member and returns the expected value" do
|
196
|
-
expect(subject).to respond_to(:nivcsw)
|
197
|
-
expect(subject.nivcsw).to be_kind_of(Fixnum)
|
198
|
-
end
|
199
|
-
|
200
|
-
it "contains a utime member and returns the expected value" do
|
201
|
-
expect(subject).to respond_to(:utime)
|
202
|
-
expect(subject.utime).to be_kind_of(Fixnum)
|
203
|
-
end
|
204
|
-
|
205
|
-
it "contains a stime member and returns the expected value" do
|
206
|
-
expect(subject).to respond_to(:stime)
|
207
|
-
expect(subject.stime).to be_kind_of(Fixnum)
|
208
|
-
end
|
209
|
-
end
|
210
|
-
end
|