Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: ps in perl?

by pileofrogs (Priest)
on Apr 04, 2008 at 16:17 UTC ( [id://678409]=note: print w/replies, xml ) Need Help??


in reply to ps in perl?

Wow, I totally suck. I asked this question, got boatloads of answers, and didn't even check back...

I'll update in case someone else asks this same question or maybe just to complete the circle of carma...

I don't need Windows compatability, but I need more than Linux. I run Linux and OpenBSD. So that rules out proc.

The output of programs like ps can sometimes change over time and between Linux and OpenBSD, so I don't want to maintain the regexs to keep track of all that. If there were something like a POSIX process_list() c function that had an obvious perl wrapper, that would be ideal. It looks like there is no such thing though.

Using a CPAN module is OK, but not ideal. I don't have any problems politically or technically, but every time I add another CPAN dependency, there's another link in the chain to break, so if it's something I can do reasonably without a CPAN module, I will.

That being said, in this case using a CPAN modules is probaly the best idea. I can let someone else handle the headaches of keeping their module in sync with however the OS likes to present process info.

Thanks everyone!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://678409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2025-07-16 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.