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!


In reply to Re: ps in perl? by pileofrogs
in thread ps in perl? by pileofrogs

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.