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/MANIFEST
CHANGED
@@ -1,33 +1,34 @@
|
|
1
|
-
* CHANGES
|
2
|
-
* MANIFEST
|
3
|
-
* Rakefile
|
4
|
-
* README
|
5
|
-
* sys-proctable.gemspec
|
6
|
-
* doc/aix.txt
|
7
|
-
* doc/bsd.txt
|
8
|
-
* doc/hpux.txt
|
9
|
-
* doc/linux.txt
|
10
|
-
* doc/solaris.txt
|
11
|
-
* doc/top.txt
|
12
|
-
* doc/windows.txt
|
13
|
-
* example/example_ps.rb
|
14
|
-
* ext/darwin/extconf.rb
|
15
|
-
* ext/darwin/sys/proctable.c
|
16
|
-
* ext/hpux/extconf.rb
|
17
|
-
* ext/hpux/sys/proctable.c
|
18
|
-
* lib/sys
|
19
|
-
* lib/sys/
|
20
|
-
* lib/
|
21
|
-
* lib/
|
22
|
-
* lib/
|
23
|
-
* lib/
|
24
|
-
* lib/
|
25
|
-
*
|
26
|
-
* test/
|
27
|
-
* test/
|
28
|
-
* test/
|
29
|
-
* test/
|
30
|
-
* test/
|
31
|
-
* test/
|
32
|
-
* test/
|
33
|
-
* test/
|
1
|
+
* CHANGES
|
2
|
+
* MANIFEST
|
3
|
+
* Rakefile
|
4
|
+
* README
|
5
|
+
* sys-proctable.gemspec
|
6
|
+
* doc/aix.txt
|
7
|
+
* doc/bsd.txt
|
8
|
+
* doc/hpux.txt
|
9
|
+
* doc/linux.txt
|
10
|
+
* doc/solaris.txt
|
11
|
+
* doc/top.txt
|
12
|
+
* doc/windows.txt
|
13
|
+
* example/example_ps.rb
|
14
|
+
* ext/darwin/extconf.rb
|
15
|
+
* ext/darwin/sys/proctable.c
|
16
|
+
* ext/hpux/extconf.rb
|
17
|
+
* ext/hpux/sys/proctable.c
|
18
|
+
* lib/sys-proctable.rb
|
19
|
+
* lib/sys/top.rb
|
20
|
+
* lib/sys/proctable/version.rb
|
21
|
+
* lib/aix/sys/proctable.rb
|
22
|
+
* lib/freebsd/sys/proctable.rb
|
23
|
+
* lib/linux/sys/proctable.rb
|
24
|
+
* lib/sunos/sys/proctable.rb
|
25
|
+
* lib/windows/sys/proctable.rb
|
26
|
+
* test/test_sys_proctable_aix.rb
|
27
|
+
* test/test_sys_proctable_all.rb
|
28
|
+
* test/test_sys_proctable_darwin.rb
|
29
|
+
* test/test_sys_proctable_freebsd.rb
|
30
|
+
* test/test_sys_proctable_hpux.rb
|
31
|
+
* test/test_sys_proctable_linux.rb
|
32
|
+
* test/test_sys_proctable_sunos.rb
|
33
|
+
* test/test_sys_proctable_windows.rb
|
34
|
+
* test/test_sys_top.rb
|
data/README
CHANGED
@@ -1,118 +1,118 @@
|
|
1
|
-
== Description
|
2
|
-
A Ruby interface for gathering process information.
|
3
|
-
|
4
|
-
== Prerequisites
|
5
|
-
* Test::Unit 2.x (development only)
|
6
|
-
|
7
|
-
== Supported Platforms
|
8
|
-
* Windows 2000 or later
|
9
|
-
* Linux 2.6+
|
10
|
-
* FreeBSD
|
11
|
-
* Solaris 8+
|
12
|
-
* HP-UX 10+
|
13
|
-
* OS X 10.4+
|
14
|
-
* AIX 5.3+
|
15
|
-
|
16
|
-
== Installation
|
17
|
-
gem install sys-proctable
|
18
|
-
|
19
|
-
You may need to specify a platform in some cases. For example:
|
20
|
-
|
21
|
-
gem install sys-proctable --platform mswin32 # Windows
|
22
|
-
gem install sys-proctable --platform sunos # Solaris
|
23
|
-
gem install sys-proctable --platform linux # Linux
|
24
|
-
gem install sys-proctable --platform freebsd # FreeBSD
|
25
|
-
|
26
|
-
== Synopsis
|
27
|
-
require 'sys/proctable'
|
28
|
-
include Sys
|
29
|
-
|
30
|
-
# Everything
|
31
|
-
ProcTable.ps{ |p|
|
32
|
-
puts p.pid.to_s
|
33
|
-
puts p.comm
|
34
|
-
# ...
|
35
|
-
}
|
36
|
-
|
37
|
-
# Just one process
|
38
|
-
s = ProcTable.ps(2123)
|
39
|
-
puts s.pid.to_s
|
40
|
-
puts s.comm
|
41
|
-
# ...
|
42
|
-
|
43
|
-
# Return the results as an array of ProcTableStructs
|
44
|
-
a = ProcTable.ps
|
45
|
-
a.each do |p|
|
46
|
-
puts p.pid
|
47
|
-
# ...
|
48
|
-
end
|
49
|
-
|
50
|
-
== Notes
|
51
|
-
Windows users may pass a host name as a second argument to get process
|
52
|
-
information from a different host. This relies on the WMI service running.
|
53
|
-
|
54
|
-
== Known Issues
|
55
|
-
=== FreeBSD
|
56
|
-
A kvm interface is used. That means the owner of the process using the
|
57
|
-
sys-proctable library needs to be a member of the kvm group (or root).
|
58
|
-
|
59
|
-
=== Solaris
|
60
|
-
The cmdline member on Solaris is limited to 80 characters unless you (or
|
61
|
-
your program) own the process. This is a Solaris design flaw/feature.
|
62
|
-
|
63
|
-
=== Thread Safety
|
64
|
-
I am not currently using a thread-safe version of readdir() for versions
|
65
|
-
of this library that use C. I am not especially concerned about it either.
|
66
|
-
If you are trying to read information out of /proc from different threads
|
67
|
-
at the same time there is something seriously wrong with your code logic.
|
68
|
-
Using readdir_r() still won't solve all potential thread safety issues anyway.
|
69
|
-
|
70
|
-
== Future Plans
|
71
|
-
Add support for NetBSD and OpenBSD.
|
72
|
-
Convert existing C code to FFI.
|
73
|
-
|
74
|
-
== Acknowledgements
|
75
|
-
This library was originally based on the Perl module Proc::ProcessTable
|
76
|
-
by Dan Urist. Many ideas, as well as large chunks of code, were taken
|
77
|
-
from his work. So, a big THANK YOU goes out to Dan Urist.
|
78
|
-
|
79
|
-
A big thanks also goes out to Mike Hall who was very helpful with ideas,
|
80
|
-
logic and testing.
|
81
|
-
|
82
|
-
Thanks also go to Sean Chittenden for providing an account on one of his
|
83
|
-
FreeBSD machines. This is how the FreeBSD support was (initially) added.
|
84
|
-
|
85
|
-
Thanks go to James Hranicky for providing a patch that grabs name, eid,
|
86
|
-
euid, gid and guid info in the Linux version, along with some general
|
87
|
-
debugging help.
|
88
|
-
|
89
|
-
Thanks go to David Felstead for the original OS X code. Thanks also go
|
90
|
-
to Matthias Zirnstein for adding cmdline support for OS X.
|
91
|
-
|
92
|
-
Finally I'd like to thank all the folks who have submitted bug reports
|
93
|
-
and/or patches.
|
94
|
-
|
95
|
-
== Help Wanted
|
96
|
-
I do not have access to all platforms. If your platform is not supported
|
97
|
-
then you will need to either submit a patch or give me a remote account
|
98
|
-
on a box with a compiler so that I can write the code.
|
99
|
-
|
100
|
-
== More documentation
|
101
|
-
See the documentation under the 'doc' directory for more information,
|
102
|
-
including platform specific notes and issues.
|
103
|
-
|
104
|
-
== License
|
105
|
-
Artistic 2.0
|
106
|
-
|
107
|
-
== Copyright
|
108
|
-
(C) 2003-2015 Daniel J. Berger
|
109
|
-
All Rights Reserved.
|
110
|
-
|
111
|
-
== Contributions
|
112
|
-
Although this library is free, please consider having your company
|
113
|
-
setup a gittip if used by your company professionally.
|
114
|
-
|
115
|
-
http://www.gittip.com/djberg96/
|
116
|
-
|
117
|
-
== Author
|
118
|
-
Daniel J. Berger
|
1
|
+
== Description
|
2
|
+
A Ruby interface for gathering process information.
|
3
|
+
|
4
|
+
== Prerequisites
|
5
|
+
* Test::Unit 2.x (development only)
|
6
|
+
|
7
|
+
== Supported Platforms
|
8
|
+
* Windows 2000 or later
|
9
|
+
* Linux 2.6+
|
10
|
+
* FreeBSD
|
11
|
+
* Solaris 8+
|
12
|
+
* HP-UX 10+
|
13
|
+
* OS X 10.4+
|
14
|
+
* AIX 5.3+
|
15
|
+
|
16
|
+
== Installation
|
17
|
+
gem install sys-proctable
|
18
|
+
|
19
|
+
You may need to specify a platform in some cases. For example:
|
20
|
+
|
21
|
+
gem install sys-proctable --platform mswin32 # Windows
|
22
|
+
gem install sys-proctable --platform sunos # Solaris
|
23
|
+
gem install sys-proctable --platform linux # Linux
|
24
|
+
gem install sys-proctable --platform freebsd # FreeBSD
|
25
|
+
|
26
|
+
== Synopsis
|
27
|
+
require 'sys/proctable'
|
28
|
+
include Sys
|
29
|
+
|
30
|
+
# Everything
|
31
|
+
ProcTable.ps{ |p|
|
32
|
+
puts p.pid.to_s
|
33
|
+
puts p.comm
|
34
|
+
# ...
|
35
|
+
}
|
36
|
+
|
37
|
+
# Just one process
|
38
|
+
s = ProcTable.ps(2123)
|
39
|
+
puts s.pid.to_s
|
40
|
+
puts s.comm
|
41
|
+
# ...
|
42
|
+
|
43
|
+
# Return the results as an array of ProcTableStructs
|
44
|
+
a = ProcTable.ps
|
45
|
+
a.each do |p|
|
46
|
+
puts p.pid
|
47
|
+
# ...
|
48
|
+
end
|
49
|
+
|
50
|
+
== Notes
|
51
|
+
Windows users may pass a host name as a second argument to get process
|
52
|
+
information from a different host. This relies on the WMI service running.
|
53
|
+
|
54
|
+
== Known Issues
|
55
|
+
=== FreeBSD
|
56
|
+
A kvm interface is used. That means the owner of the process using the
|
57
|
+
sys-proctable library needs to be a member of the kvm group (or root).
|
58
|
+
|
59
|
+
=== Solaris
|
60
|
+
The cmdline member on Solaris is limited to 80 characters unless you (or
|
61
|
+
your program) own the process. This is a Solaris design flaw/feature.
|
62
|
+
|
63
|
+
=== Thread Safety
|
64
|
+
I am not currently using a thread-safe version of readdir() for versions
|
65
|
+
of this library that use C. I am not especially concerned about it either.
|
66
|
+
If you are trying to read information out of /proc from different threads
|
67
|
+
at the same time there is something seriously wrong with your code logic.
|
68
|
+
Using readdir_r() still won't solve all potential thread safety issues anyway.
|
69
|
+
|
70
|
+
== Future Plans
|
71
|
+
Add support for NetBSD and OpenBSD.
|
72
|
+
Convert existing C code to FFI.
|
73
|
+
|
74
|
+
== Acknowledgements
|
75
|
+
This library was originally based on the Perl module Proc::ProcessTable
|
76
|
+
by Dan Urist. Many ideas, as well as large chunks of code, were taken
|
77
|
+
from his work. So, a big THANK YOU goes out to Dan Urist.
|
78
|
+
|
79
|
+
A big thanks also goes out to Mike Hall who was very helpful with ideas,
|
80
|
+
logic and testing.
|
81
|
+
|
82
|
+
Thanks also go to Sean Chittenden for providing an account on one of his
|
83
|
+
FreeBSD machines. This is how the FreeBSD support was (initially) added.
|
84
|
+
|
85
|
+
Thanks go to James Hranicky for providing a patch that grabs name, eid,
|
86
|
+
euid, gid and guid info in the Linux version, along with some general
|
87
|
+
debugging help.
|
88
|
+
|
89
|
+
Thanks go to David Felstead for the original OS X code. Thanks also go
|
90
|
+
to Matthias Zirnstein for adding cmdline support for OS X.
|
91
|
+
|
92
|
+
Finally I'd like to thank all the folks who have submitted bug reports
|
93
|
+
and/or patches.
|
94
|
+
|
95
|
+
== Help Wanted
|
96
|
+
I do not have access to all platforms. If your platform is not supported
|
97
|
+
then you will need to either submit a patch or give me a remote account
|
98
|
+
on a box with a compiler so that I can write the code.
|
99
|
+
|
100
|
+
== More documentation
|
101
|
+
See the documentation under the 'doc' directory for more information,
|
102
|
+
including platform specific notes and issues.
|
103
|
+
|
104
|
+
== License
|
105
|
+
Artistic 2.0
|
106
|
+
|
107
|
+
== Copyright
|
108
|
+
(C) 2003-2015 Daniel J. Berger
|
109
|
+
All Rights Reserved.
|
110
|
+
|
111
|
+
== Contributions
|
112
|
+
Although this library is free, please consider having your company
|
113
|
+
setup a gittip if used by your company professionally.
|
114
|
+
|
115
|
+
http://www.gittip.com/djberg96/
|
116
|
+
|
117
|
+
== Author
|
118
|
+
Daniel J. Berger
|