Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

How do I find the total memory/cpu usage of a process and all of its children?

by entropy (Sexton)
on Jun 09, 2001 at 02:22 UTC ( #87105=perlquestion: print w/replies, xml ) Need Help??

entropy has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl program that forks like it's no tomorrow... I want to know the total memory usage at any given time. This seems tricky to me since much of the memory (most of the perl interpreter, in fact) is shared between all processes. I would also like to know the total CPU time used, including from child processes that may have died. The Proc::ProcessTable will give me many useful fields, but it seems I may have to add some of these numbers together in order to get what I want.

Originally posted as a Categorized Question.

  • Comment on How do I find the total memory/cpu usage of a process and all of its children?

Replies are listed 'Best First'.
Re: How do I find the total memory/cpu usage of a process and all of its children?
by jorg (Friar) on Jun 09, 2001 at 13:54 UTC
    Have a look at the Benchmark module that comes included with any standard perl distribution. It will give you an idea on how much resources a process + its children are using.
Re: How do I find the total memory/cpu usage of a process and all of its children?
by I0 (Priest) on Jun 10, 2001 at 04:14 UTC
Re: How do I find the total memory/cpu usage of a process and all of its children?
by stuffy (Monk) on Jun 09, 2001 at 13:19 UTC
    If on a Linux box, running "top" from the consol will list the top processes running, and give cpu usage and memory percentage.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2021-04-19 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?