You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gregory Matthews <gr...@iwebtips.com> on 2002/05/20 22:50:35 UTC

Monitoring the processes

Thanks to everyone for the great input on Memory Leaks.  Now that I have a 
good starting point for tracking down the problem, when I TEST for leaks, 
or simply check for a continued increase in server memory usage, how do I 
go about monitoring the processes growth?

For example, is there a command line tool to use that will allow me to see 
the process growth upon request reload?  I know that I should run the 
server with httpd -X, but I don't know how to actually see the memory being 
used/increased/decreased when the prog is being executed. As I understand 
it, this is a good indication that there might be a problem.

Thanks in advance.

Gregory 



Re: Monitoring the processes

Posted by Perrin Harkins <pe...@elem.com>.
Gregory Matthews wrote:
> For example, is there a command line tool to use that will allow me to 
> see the process growth upon request reload?  I know that I should run 
> the server with httpd -X, but I don't know how to actually see the 
> memory being used/increased/decreased when the prog is being executed. 
> As I understand it, this is a good indication that there might be a 
> problem.

You can steal some code from Apache::SizeLimit or Apache::GTopLimit to 
print the current size in the error log.  Otherwise, just use top.  Keep 
in mind that sometimes a leaky piece of code will have to be run several 
times before you see the leak, because of the way that Perl allocates 
memory in chunks.

- Perrin


Re: Monitoring the processes

Posted by "F. Xavier Noria" <fx...@isoco.com>.
On Mon, 20 May 2002 15:50:35 -0500
Gregory Matthews <gr...@iwebtips.com> wrote:

: Thanks to everyone for the great input on Memory Leaks.  Now that I have a 
: good starting point for tracking down the problem, when I TEST for leaks, 
: or simply check for a continued increase in server memory usage, how do I 
: go about monitoring the processes growth?

I have not used it, but it seems Apache::Status can help, see the
documentation about the option StatusTerseSizeMainSummary.

-- fxn


Re: Monitoring the processes

Posted by Gregory Matthews <gr...@iwebtips.com>.
Sorry for being lazy! I will read the guide all the way through...promise!

Thanks though for everyone's help up to this point!

Gregory

At 12:04 PM 5/21/2002 +0800, you wrote:
>Gregory Matthews wrote:
>>Thanks to everyone for the great input on Memory Leaks.  Now that I have 
>>a good starting point for tracking down the problem, when I TEST for 
>>leaks, or simply check for a continued increase in server memory usage, 
>>how do I go about monitoring the processes growth?
>>For example, is there a command line tool to use that will allow me to 
>>see the process growth upon request reload?  I know that I should run the 
>>server with httpd -X, but I don't know how to actually see the memory 
>>being used/increased/decreased when the prog is being executed. As I 
>>understand it, this is a good indication that there might be a problem.
>
>Apache::VMonitor is great! (well, I wrote it :)
>
>Gregory, before you continue asking more questions... it's all the guide:
>http://perl.apache.org/release/docs/1.0/guide/performance.html#Measuring_the_Memory_of_the_Process
>
>so before you ask, check the guide. Use the search if you don't know where 
>to look.
>__________________________________________________________________
>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>mailto:stas@stason.org http://use.perl.org http://apacheweek.com
>http://modperlbook.org http://apache.org   http://ticketmaster.com
>



Re: Monitoring the processes

Posted by Stas Bekman <st...@stason.org>.
Gregory Matthews wrote:
> Thanks to everyone for the great input on Memory Leaks.  Now that I have 
> a good starting point for tracking down the problem, when I TEST for 
> leaks, or simply check for a continued increase in server memory usage, 
> how do I go about monitoring the processes growth?
> 
> For example, is there a command line tool to use that will allow me to 
> see the process growth upon request reload?  I know that I should run 
> the server with httpd -X, but I don't know how to actually see the 
> memory being used/increased/decreased when the prog is being executed. 
> As I understand it, this is a good indication that there might be a 
> problem.

Apache::VMonitor is great! (well, I wrote it :)

Gregory, before you continue asking more questions... it's all the guide:
http://perl.apache.org/release/docs/1.0/guide/performance.html#Measuring_the_Memory_of_the_Process

so before you ask, check the guide. Use the search if you don't know 
where to look.
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Monitoring the processes

Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 22:50 20.05.2002, Gregory Matthews wrote:
>Thanks to everyone for the great input on Memory Leaks.  Now that I have a 
>good starting point for tracking down the problem, when I TEST for leaks, 
>or simply check for a continued increase in server memory usage, how do I 
>go about monitoring the processes growth?
>
>For example, is there a command line tool to use that will allow me to see 
>the process growth upon request reload?  I know that I should run the 
>server with httpd -X, but I don't know how to actually see the memory 
>being used/increased/decreased when the prog is being executed. As I 
>understand it, this is a good indication that there might be a problem.

What about using top(1) on Unix systems?


-- 
Per Einar Ellefsen
per.einar@skynet.be