sys-proctable 0.9.8-universal-mingw32 → 0.9.9-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- checksums.yaml.gz.sig +0 -0
- data/CHANGES +353 -347
- data/MANIFEST +34 -33
- data/README +118 -118
- data/Rakefile +218 -198
- data/benchmarks/bench_ps.rb +21 -21
- data/doc/top.txt +46 -46
- data/examples/example_ps.rb +20 -20
- data/lib/sys/proctable/version.rb +6 -6
- data/lib/sys/top.rb +31 -31
- data/lib/sys-proctable.rb +1 -0
- data/lib/windows/sys/proctable.rb +207 -207
- data/sys-proctable.gemspec +40 -39
- data/test/test_sys_proctable_all.rb +87 -87
- data/test/test_sys_proctable_windows.rb +324 -324
- data/test/test_sys_top.rb +46 -46
- data.tar.gz.sig +0 -0
- metadata +40 -17
- metadata.gz.sig +0 -0
data/lib/sys/top.rb
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
require 'sys/proctable'
|
2
|
-
|
3
|
-
# The Sys module serves as a namespace only
|
4
|
-
module Sys
|
5
|
-
|
6
|
-
# The Top class serves as a toplevel name for the 'top' method.
|
7
|
-
class Top
|
8
|
-
|
9
|
-
# The version of the sys-top library
|
10
|
-
VERSION = '1.0.4'
|
11
|
-
|
12
|
-
# Returns an array of Struct::ProcTableStruct elements containing up
|
13
|
-
# to +num+ elements, sorted by +field+. The default number of elements
|
14
|
-
# is 10, while the default field is 'pctcpu'.
|
15
|
-
#
|
16
|
-
# Exception: the default sort field is 'pid' on AIX and Windows.
|
17
|
-
#
|
18
|
-
def self.top(num=10, field='pctcpu')
|
19
|
-
field = field.to_s if field.is_a?(Symbol)
|
20
|
-
|
21
|
-
aix = RbConfig::CONFIG['host_os'] =~ /aix/i
|
22
|
-
|
23
|
-
# Sort by pid on Windows and AIX by default
|
24
|
-
if (File::ALT_SEPARATOR || aix) && field == 'pctcpu'
|
25
|
-
field = 'pid'
|
26
|
-
end
|
27
|
-
|
28
|
-
Sys::ProcTable.ps.sort_by{ |obj| obj.send(field) || '' }[0..num-1]
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
1
|
+
require 'sys/proctable'
|
2
|
+
|
3
|
+
# The Sys module serves as a namespace only
|
4
|
+
module Sys
|
5
|
+
|
6
|
+
# The Top class serves as a toplevel name for the 'top' method.
|
7
|
+
class Top
|
8
|
+
|
9
|
+
# The version of the sys-top library
|
10
|
+
VERSION = '1.0.4'
|
11
|
+
|
12
|
+
# Returns an array of Struct::ProcTableStruct elements containing up
|
13
|
+
# to +num+ elements, sorted by +field+. The default number of elements
|
14
|
+
# is 10, while the default field is 'pctcpu'.
|
15
|
+
#
|
16
|
+
# Exception: the default sort field is 'pid' on AIX and Windows.
|
17
|
+
#
|
18
|
+
def self.top(num=10, field='pctcpu')
|
19
|
+
field = field.to_s if field.is_a?(Symbol)
|
20
|
+
|
21
|
+
aix = RbConfig::CONFIG['host_os'] =~ /aix/i
|
22
|
+
|
23
|
+
# Sort by pid on Windows and AIX by default
|
24
|
+
if (File::ALT_SEPARATOR || aix) && field == 'pctcpu'
|
25
|
+
field = 'pid'
|
26
|
+
end
|
27
|
+
|
28
|
+
Sys::ProcTable.ps.sort_by{ |obj| obj.send(field) || '' }[0..num-1]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'sys/proctable'
|
@@ -1,207 +1,207 @@
|
|
1
|
-
require 'win32ole'
|
2
|
-
require 'socket'
|
3
|
-
require 'date'
|
4
|
-
require 'sys/proctable/version'
|
5
|
-
|
6
|
-
# The Sys module serves as a namespace only
|
7
|
-
module Sys
|
8
|
-
|
9
|
-
# The ProcTable class encapsulates process table information
|
10
|
-
class ProcTable
|
11
|
-
|
12
|
-
# There is no constructor
|
13
|
-
private_class_method :new
|
14
|
-
|
15
|
-
# Error typically raised if one of the Sys::ProcTable methods fails
|
16
|
-
class Error < StandardError; end
|
17
|
-
|
18
|
-
# The comm field corresponds to the 'name' field. The 'cmdline' field
|
19
|
-
# is the CommandLine attribute on Windows XP or later, or the
|
20
|
-
# 'executable_path' field on Windows 2000 or earlier.
|
21
|
-
#
|
22
|
-
@fields = %w[
|
23
|
-
caption
|
24
|
-
cmdline
|
25
|
-
comm
|
26
|
-
creation_class_name
|
27
|
-
creation_date
|
28
|
-
cs_creation_class_name
|
29
|
-
cs_name
|
30
|
-
description
|
31
|
-
executable_path
|
32
|
-
execution_state
|
33
|
-
handle
|
34
|
-
handle_count
|
35
|
-
install_date
|
36
|
-
kernel_mode_time
|
37
|
-
maximum_working_set_size
|
38
|
-
minimum_working_set_size
|
39
|
-
name
|
40
|
-
os_creation_class_name
|
41
|
-
os_name
|
42
|
-
other_operation_count
|
43
|
-
other_transfer_count
|
44
|
-
page_faults
|
45
|
-
page_file_usage
|
46
|
-
ppid
|
47
|
-
peak_page_file_usage
|
48
|
-
peak_virtual_size
|
49
|
-
peak_working_set_size
|
50
|
-
priority
|
51
|
-
private_page_count
|
52
|
-
pid
|
53
|
-
quota_non_paged_pool_usage
|
54
|
-
quota_paged_pool_usage
|
55
|
-
quota_peak_non_paged_pool_usage
|
56
|
-
quota_peak_paged_pool_usage
|
57
|
-
read_operation_count
|
58
|
-
read_transfer_count
|
59
|
-
session_id
|
60
|
-
status
|
61
|
-
termination_date
|
62
|
-
thread_count
|
63
|
-
user_mode_time
|
64
|
-
virtual_size
|
65
|
-
windows_version
|
66
|
-
working_set_size
|
67
|
-
write_operation_count
|
68
|
-
write_transfer_count
|
69
|
-
]
|
70
|
-
|
71
|
-
ProcTableStruct = Struct.new("ProcTableStruct", *@fields)
|
72
|
-
|
73
|
-
# call-seq:
|
74
|
-
# ProcTable.fields
|
75
|
-
#
|
76
|
-
# Returns an array of fields that each ProcTableStruct will contain. This
|
77
|
-
# may be useful if you want to know in advance what fields are available
|
78
|
-
# without having to perform at least one read of the /proc table.
|
79
|
-
#
|
80
|
-
def self.fields
|
81
|
-
@fields
|
82
|
-
end
|
83
|
-
|
84
|
-
# call-seq:
|
85
|
-
# ProcTable.ps(pid=nil)
|
86
|
-
# ProcTable.ps(pid=nil){ |ps| ... }
|
87
|
-
#
|
88
|
-
# In block form, yields a ProcTableStruct for each process entry that you
|
89
|
-
# have rights to. This method returns an array of ProcTableStruct's in
|
90
|
-
# non-block form.
|
91
|
-
#
|
92
|
-
# If a +pid+ is provided, then only a single ProcTableStruct is yielded or
|
93
|
-
# returned, or nil if no process information is found for that +pid+.
|
94
|
-
#
|
95
|
-
def self.ps(pid=nil, host=Socket.gethostname)
|
96
|
-
if pid
|
97
|
-
raise TypeError unless pid.kind_of?(Fixnum)
|
98
|
-
end
|
99
|
-
|
100
|
-
array = block_given? ? nil : []
|
101
|
-
struct = nil
|
102
|
-
|
103
|
-
begin
|
104
|
-
wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2")
|
105
|
-
rescue WIN32OLERuntimeError => e
|
106
|
-
raise Error, e # Re-raise as ProcTable::Error
|
107
|
-
else
|
108
|
-
wmi.InstancesOf("Win32_Process").each{ |wproc|
|
109
|
-
if pid
|
110
|
-
next unless wproc.ProcessId == pid
|
111
|
-
end
|
112
|
-
|
113
|
-
# Some fields are added later, and so are nil initially
|
114
|
-
struct = ProcTableStruct.new(
|
115
|
-
wproc.Caption,
|
116
|
-
nil, # Added later, based on OS version
|
117
|
-
wproc.Name,
|
118
|
-
wproc.CreationClassName,
|
119
|
-
self.parse_ms_date(wproc.CreationDate),
|
120
|
-
wproc.CSCreationClassName,
|
121
|
-
wproc.CSName,
|
122
|
-
wproc.Description,
|
123
|
-
wproc.ExecutablePath,
|
124
|
-
wproc.ExecutionState,
|
125
|
-
wproc.Handle,
|
126
|
-
wproc.HandleCount,
|
127
|
-
self.parse_ms_date(wproc.InstallDate),
|
128
|
-
self.convert(wproc.KernelModeTime),
|
129
|
-
wproc.MaximumWorkingSetSize,
|
130
|
-
wproc.MinimumWorkingSetSize,
|
131
|
-
wproc.Name,
|
132
|
-
wproc.OSCreationClassName,
|
133
|
-
wproc.OSName,
|
134
|
-
self.convert(wproc.OtherOperationCount),
|
135
|
-
self.convert(wproc.OtherTransferCount),
|
136
|
-
wproc.PageFaults,
|
137
|
-
wproc.PageFileUsage,
|
138
|
-
wproc.ParentProcessId,
|
139
|
-
self.convert(wproc.PeakPageFileUsage),
|
140
|
-
self.convert(wproc.PeakVirtualSize),
|
141
|
-
self.convert(wproc.PeakWorkingSetSize),
|
142
|
-
wproc.Priority,
|
143
|
-
self.convert(wproc.PrivatePageCount),
|
144
|
-
wproc.ProcessId,
|
145
|
-
wproc.QuotaNonPagedPoolUsage,
|
146
|
-
wproc.QuotaPagedPoolUsage,
|
147
|
-
wproc.QuotaPeakNonPagedPoolUsage,
|
148
|
-
wproc.QuotaPeakPagedPoolUsage,
|
149
|
-
self.convert(wproc.ReadOperationCount),
|
150
|
-
self.convert(wproc.ReadTransferCount),
|
151
|
-
wproc.SessionId,
|
152
|
-
wproc.Status,
|
153
|
-
self.parse_ms_date(wproc.TerminationDate),
|
154
|
-
wproc.ThreadCount,
|
155
|
-
self.convert(wproc.UserModeTime),
|
156
|
-
self.convert(wproc.VirtualSize),
|
157
|
-
wproc.WindowsVersion,
|
158
|
-
self.convert(wproc.WorkingSetSize),
|
159
|
-
self.convert(wproc.WriteOperationCount),
|
160
|
-
self.convert(wproc.WriteTransferCount)
|
161
|
-
)
|
162
|
-
|
163
|
-
###############################################################
|
164
|
-
# On Windows XP or later, set the cmdline to the CommandLine
|
165
|
-
# attribute. Otherwise, set it to the ExecutablePath
|
166
|
-
# attribute.
|
167
|
-
###############################################################
|
168
|
-
if wproc.WindowsVersion.to_f < 5.1
|
169
|
-
struct.cmdline = wproc.ExecutablePath
|
170
|
-
else
|
171
|
-
struct.cmdline = wproc.CommandLine
|
172
|
-
end
|
173
|
-
|
174
|
-
struct.freeze # This is read-only data
|
175
|
-
|
176
|
-
if block_given?
|
177
|
-
yield struct
|
178
|
-
else
|
179
|
-
array << struct
|
180
|
-
end
|
181
|
-
}
|
182
|
-
end
|
183
|
-
|
184
|
-
pid ? struct : array
|
185
|
-
end
|
186
|
-
|
187
|
-
private
|
188
|
-
|
189
|
-
#######################################################################
|
190
|
-
# Converts a string in the format '20040703074625.015625-360' into a
|
191
|
-
# Ruby Time object.
|
192
|
-
#######################################################################
|
193
|
-
def self.parse_ms_date(str)
|
194
|
-
return if str.nil?
|
195
|
-
return DateTime.parse(str)
|
196
|
-
end
|
197
|
-
|
198
|
-
#####################################################################
|
199
|
-
# There is a bug in win32ole where uint64 types are returned as a
|
200
|
-
# String instead of a Fixnum. This method deals with that for now.
|
201
|
-
#####################################################################
|
202
|
-
def self.convert(str)
|
203
|
-
return nil if str.nil? # Return nil, not 0
|
204
|
-
return str.to_i
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
1
|
+
require 'win32ole'
|
2
|
+
require 'socket'
|
3
|
+
require 'date'
|
4
|
+
require 'sys/proctable/version'
|
5
|
+
|
6
|
+
# The Sys module serves as a namespace only
|
7
|
+
module Sys
|
8
|
+
|
9
|
+
# The ProcTable class encapsulates process table information
|
10
|
+
class ProcTable
|
11
|
+
|
12
|
+
# There is no constructor
|
13
|
+
private_class_method :new
|
14
|
+
|
15
|
+
# Error typically raised if one of the Sys::ProcTable methods fails
|
16
|
+
class Error < StandardError; end
|
17
|
+
|
18
|
+
# The comm field corresponds to the 'name' field. The 'cmdline' field
|
19
|
+
# is the CommandLine attribute on Windows XP or later, or the
|
20
|
+
# 'executable_path' field on Windows 2000 or earlier.
|
21
|
+
#
|
22
|
+
@fields = %w[
|
23
|
+
caption
|
24
|
+
cmdline
|
25
|
+
comm
|
26
|
+
creation_class_name
|
27
|
+
creation_date
|
28
|
+
cs_creation_class_name
|
29
|
+
cs_name
|
30
|
+
description
|
31
|
+
executable_path
|
32
|
+
execution_state
|
33
|
+
handle
|
34
|
+
handle_count
|
35
|
+
install_date
|
36
|
+
kernel_mode_time
|
37
|
+
maximum_working_set_size
|
38
|
+
minimum_working_set_size
|
39
|
+
name
|
40
|
+
os_creation_class_name
|
41
|
+
os_name
|
42
|
+
other_operation_count
|
43
|
+
other_transfer_count
|
44
|
+
page_faults
|
45
|
+
page_file_usage
|
46
|
+
ppid
|
47
|
+
peak_page_file_usage
|
48
|
+
peak_virtual_size
|
49
|
+
peak_working_set_size
|
50
|
+
priority
|
51
|
+
private_page_count
|
52
|
+
pid
|
53
|
+
quota_non_paged_pool_usage
|
54
|
+
quota_paged_pool_usage
|
55
|
+
quota_peak_non_paged_pool_usage
|
56
|
+
quota_peak_paged_pool_usage
|
57
|
+
read_operation_count
|
58
|
+
read_transfer_count
|
59
|
+
session_id
|
60
|
+
status
|
61
|
+
termination_date
|
62
|
+
thread_count
|
63
|
+
user_mode_time
|
64
|
+
virtual_size
|
65
|
+
windows_version
|
66
|
+
working_set_size
|
67
|
+
write_operation_count
|
68
|
+
write_transfer_count
|
69
|
+
]
|
70
|
+
|
71
|
+
ProcTableStruct = Struct.new("ProcTableStruct", *@fields)
|
72
|
+
|
73
|
+
# call-seq:
|
74
|
+
# ProcTable.fields
|
75
|
+
#
|
76
|
+
# Returns an array of fields that each ProcTableStruct will contain. This
|
77
|
+
# may be useful if you want to know in advance what fields are available
|
78
|
+
# without having to perform at least one read of the /proc table.
|
79
|
+
#
|
80
|
+
def self.fields
|
81
|
+
@fields
|
82
|
+
end
|
83
|
+
|
84
|
+
# call-seq:
|
85
|
+
# ProcTable.ps(pid=nil)
|
86
|
+
# ProcTable.ps(pid=nil){ |ps| ... }
|
87
|
+
#
|
88
|
+
# In block form, yields a ProcTableStruct for each process entry that you
|
89
|
+
# have rights to. This method returns an array of ProcTableStruct's in
|
90
|
+
# non-block form.
|
91
|
+
#
|
92
|
+
# If a +pid+ is provided, then only a single ProcTableStruct is yielded or
|
93
|
+
# returned, or nil if no process information is found for that +pid+.
|
94
|
+
#
|
95
|
+
def self.ps(pid=nil, host=Socket.gethostname)
|
96
|
+
if pid
|
97
|
+
raise TypeError unless pid.kind_of?(Fixnum)
|
98
|
+
end
|
99
|
+
|
100
|
+
array = block_given? ? nil : []
|
101
|
+
struct = nil
|
102
|
+
|
103
|
+
begin
|
104
|
+
wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2")
|
105
|
+
rescue WIN32OLERuntimeError => e
|
106
|
+
raise Error, e # Re-raise as ProcTable::Error
|
107
|
+
else
|
108
|
+
wmi.InstancesOf("Win32_Process").each{ |wproc|
|
109
|
+
if pid
|
110
|
+
next unless wproc.ProcessId == pid
|
111
|
+
end
|
112
|
+
|
113
|
+
# Some fields are added later, and so are nil initially
|
114
|
+
struct = ProcTableStruct.new(
|
115
|
+
wproc.Caption,
|
116
|
+
nil, # Added later, based on OS version
|
117
|
+
wproc.Name,
|
118
|
+
wproc.CreationClassName,
|
119
|
+
self.parse_ms_date(wproc.CreationDate),
|
120
|
+
wproc.CSCreationClassName,
|
121
|
+
wproc.CSName,
|
122
|
+
wproc.Description,
|
123
|
+
wproc.ExecutablePath,
|
124
|
+
wproc.ExecutionState,
|
125
|
+
wproc.Handle,
|
126
|
+
wproc.HandleCount,
|
127
|
+
self.parse_ms_date(wproc.InstallDate),
|
128
|
+
self.convert(wproc.KernelModeTime),
|
129
|
+
wproc.MaximumWorkingSetSize,
|
130
|
+
wproc.MinimumWorkingSetSize,
|
131
|
+
wproc.Name,
|
132
|
+
wproc.OSCreationClassName,
|
133
|
+
wproc.OSName,
|
134
|
+
self.convert(wproc.OtherOperationCount),
|
135
|
+
self.convert(wproc.OtherTransferCount),
|
136
|
+
wproc.PageFaults,
|
137
|
+
wproc.PageFileUsage,
|
138
|
+
wproc.ParentProcessId,
|
139
|
+
self.convert(wproc.PeakPageFileUsage),
|
140
|
+
self.convert(wproc.PeakVirtualSize),
|
141
|
+
self.convert(wproc.PeakWorkingSetSize),
|
142
|
+
wproc.Priority,
|
143
|
+
self.convert(wproc.PrivatePageCount),
|
144
|
+
wproc.ProcessId,
|
145
|
+
wproc.QuotaNonPagedPoolUsage,
|
146
|
+
wproc.QuotaPagedPoolUsage,
|
147
|
+
wproc.QuotaPeakNonPagedPoolUsage,
|
148
|
+
wproc.QuotaPeakPagedPoolUsage,
|
149
|
+
self.convert(wproc.ReadOperationCount),
|
150
|
+
self.convert(wproc.ReadTransferCount),
|
151
|
+
wproc.SessionId,
|
152
|
+
wproc.Status,
|
153
|
+
self.parse_ms_date(wproc.TerminationDate),
|
154
|
+
wproc.ThreadCount,
|
155
|
+
self.convert(wproc.UserModeTime),
|
156
|
+
self.convert(wproc.VirtualSize),
|
157
|
+
wproc.WindowsVersion,
|
158
|
+
self.convert(wproc.WorkingSetSize),
|
159
|
+
self.convert(wproc.WriteOperationCount),
|
160
|
+
self.convert(wproc.WriteTransferCount)
|
161
|
+
)
|
162
|
+
|
163
|
+
###############################################################
|
164
|
+
# On Windows XP or later, set the cmdline to the CommandLine
|
165
|
+
# attribute. Otherwise, set it to the ExecutablePath
|
166
|
+
# attribute.
|
167
|
+
###############################################################
|
168
|
+
if wproc.WindowsVersion.to_f < 5.1
|
169
|
+
struct.cmdline = wproc.ExecutablePath
|
170
|
+
else
|
171
|
+
struct.cmdline = wproc.CommandLine
|
172
|
+
end
|
173
|
+
|
174
|
+
struct.freeze # This is read-only data
|
175
|
+
|
176
|
+
if block_given?
|
177
|
+
yield struct
|
178
|
+
else
|
179
|
+
array << struct
|
180
|
+
end
|
181
|
+
}
|
182
|
+
end
|
183
|
+
|
184
|
+
pid ? struct : array
|
185
|
+
end
|
186
|
+
|
187
|
+
private
|
188
|
+
|
189
|
+
#######################################################################
|
190
|
+
# Converts a string in the format '20040703074625.015625-360' into a
|
191
|
+
# Ruby Time object.
|
192
|
+
#######################################################################
|
193
|
+
def self.parse_ms_date(str)
|
194
|
+
return if str.nil?
|
195
|
+
return DateTime.parse(str)
|
196
|
+
end
|
197
|
+
|
198
|
+
#####################################################################
|
199
|
+
# There is a bug in win32ole where uint64 types are returned as a
|
200
|
+
# String instead of a Fixnum. This method deals with that for now.
|
201
|
+
#####################################################################
|
202
|
+
def self.convert(str)
|
203
|
+
return nil if str.nil? # Return nil, not 0
|
204
|
+
return str.to_i
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
data/sys-proctable.gemspec
CHANGED
@@ -1,39 +1,40 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'sys-proctable'
|
5
|
-
spec.version = '0.9.
|
6
|
-
spec.author = 'Daniel J. Berger'
|
7
|
-
spec.license = 'Artistic 2.0'
|
8
|
-
spec.email = 'djberg96@gmail.com'
|
9
|
-
spec.homepage = 'http://github.com/djberg96/sys-proctable'
|
10
|
-
spec.platform = Gem::Platform::CURRENT # Probably altered by Rake task
|
11
|
-
spec.summary = 'An interface for providing process table information'
|
12
|
-
spec.test_files = ['test/test_sys_proctable_all.rb']
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'lib/sys/
|
20
|
-
'
|
21
|
-
'
|
22
|
-
'
|
23
|
-
'
|
24
|
-
'
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
spec.add_development_dependency('
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'sys-proctable'
|
5
|
+
spec.version = '0.9.9'
|
6
|
+
spec.author = 'Daniel J. Berger'
|
7
|
+
spec.license = 'Artistic 2.0'
|
8
|
+
spec.email = 'djberg96@gmail.com'
|
9
|
+
spec.homepage = 'http://github.com/djberg96/sys-proctable'
|
10
|
+
spec.platform = Gem::Platform::CURRENT # Probably altered by Rake task
|
11
|
+
spec.summary = 'An interface for providing process table information'
|
12
|
+
spec.test_files = ['test/test_sys_proctable_all.rb']
|
13
|
+
spec.cert_chain = ['certs/djberg96_pub.pem']
|
14
|
+
|
15
|
+
# Additional files for your platform are added by the 'rake gem' task.
|
16
|
+
spec.files = [
|
17
|
+
'benchmarks/bench_ps.rb',
|
18
|
+
'examples/example_ps.rb',
|
19
|
+
'lib/sys/proctable/version.rb',
|
20
|
+
'lib/sys/top.rb',
|
21
|
+
'CHANGES',
|
22
|
+
'MANIFEST',
|
23
|
+
'Rakefile',
|
24
|
+
'README',
|
25
|
+
'sys-proctable.gemspec'
|
26
|
+
]
|
27
|
+
|
28
|
+
spec.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST', 'doc/top.txt']
|
29
|
+
|
30
|
+
spec.add_development_dependency('test-unit')
|
31
|
+
spec.add_development_dependency('rake')
|
32
|
+
|
33
|
+
spec.description = <<-EOF
|
34
|
+
The sys-proctable library provides an interface for gathering information
|
35
|
+
about processes on your system, i.e. the process table. Most major
|
36
|
+
platforms are supported and, while different platforms may return
|
37
|
+
different information, the external interface is identical across
|
38
|
+
platforms.
|
39
|
+
EOF
|
40
|
+
end
|