Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 romping around the Monastery: (3)
As of 2026-05-08 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.