|
[ANN] Sys::ProcTable 0.3.0: msg#01107lang.ruby.general
Hi all, I am happy to announce the release of Sys::ProcTable 0.3.0. This is a C extension for the 'ps' command on *nix systems (it is *not* parsed system call output). With this module you can view process table information, such as pid, euid, state, etc. The exact fields available depend on your platform. What's new since the last announcement? FreeBSD support has been added! The ability to limit your results by command name Now returns an array of structs in lvalue context Some other minor bug fixes & changes Thanks go to Sean Chittenden for providing me with a FreeBSD environment to work on. Quick synopsis: require 'sys/proctable' include Sys # List available fields puts "Available fields: " + ProcTable.fields.join(', ') # Everything ProcTable.ps{ |p| puts p.pid.to_s puts p.comm ... } # or just these two processes ProcTable.ps(2123,327){ |p| puts p.pid.to_s puts p.comm ... } # or only 'vim' processes ProcTable.ps("vim"){ |p| puts p.pid.to_s puts p.comm ... } Enjoy! Dan
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Are All C Destructors Guaranteed to Be Called?, Bill Tj |
|---|---|
| Next by Date: | Re: Ruby Language Q's, Mauricio Fernández |
| Previous by Thread: | More code about Ruby and Microsoft Word, JamesBritt |
| Next by Thread: | Re: [ANN] Sys::ProcTable 0.3.0, Mauricio Fernández |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |