in reply to perl function for 'ps' ?

Perhaps you're looking for Proc::ProcessTable.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: perl function for 'ps' ?
by js1 (Monk) on Aug 14, 2006 at 10:55 UTC

    Thanks for your reply. I do know of cpan. I was actually looking for a way to do this without having to install a module. I can't install this on all the boxes I'm auditing.

      If you can get logged in and run perl or ps, then you might very well be able to install a module in your $HOME directory and use the module from there.
      You have more power than you might think!
      Check out this node.

        Thanks for your suggestion.

        I tried perl Makefile.PL PREFIX=/home/u752359/ProcessTable and that installed fine.

        However my script fails. Here's the start of it:

        #!/usr/bin/perl -w use lib '/home/u752359/ProcessTable'; use Proc::ProcessTable; $t = new Proc::ProcessTable;

        And when I run it:

        $ ./test.pl

        Can't locate Proc/ProcessTable.pm in @INC (@INC contains: /home/u752359/ProcessTable /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at ./test.pl line 5. BEGIN failed--compilation aborted at ./test.pl line 5.