Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: ps in perl?

by Khen1950fx (Canon)
on Dec 27, 2007 at 05:01 UTC ( [id://659149]=note: print w/replies, xml ) Need Help??


in reply to ps in perl?

Yet another way: If you just want the pid and psinfo for a script or program, then you could use Unix::Process by jettero
#!/usr/bin/perl use Unix::Process; my $vsz = Unix::Process->vsz($$); my $ppid = Unix::Process->ppid; my $pid = Unix::Process->pid; my $tty = Unix::Process->tty; my $stat = Unix::Process->stat; my $start = Unix::Process->start; my $rss = Unix::Process->rss; my $command = Unix::Process->command; print "$vsz, $ppid, $pid, $tty, $stat, $start, $rss, $command\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2025-07-20 09:16 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.