>>>>> On Wed, 01 Nov 2000 01:21:30 -0800, Sam Horrocks <[EMAIL PROTECTED]> said:

 > This module would attempt to tell you how much memory your process
 > is using, so your process could shutdown, restart or take other
 > actions if it is getting too large.

Is there really no module that does this already? Have you looked at
GTop?

 > The interface would be:

 >     Sys::MemoryUsage->total_vm;              # Total virtual memory in use.
 >     Sys::MemoryUsage->data_segment;  # Data segment size
 >     Sys::MemoryUsage->stack_segment; # Stack segment size
 >     Sys::MemoryUsage->text_segment;  # Text segment size

It has been violent agreement in the modules librarians circles that
Sys:: is a bad prefix because it tends to become a bit basket. Maybe
you could live with Unix::? Or Linux::? or BSD::? Or does your module
really cover all platforms?

 > If any of the values are unknown that method would return undef.  On some
 > OSes, all the methods might return undef.  Total_vm might either sum up
 > all the known values, or might get the total value directly from the OS.
 > It's possible total_vm may be more than the sum of the parts, depending
 > on how the value is obtained.

 > Currently the only way I know to get a memory usage figure is to install
 > mod_perl and then call &$Apache::SizeLimit::HOW_BIG_IS_IT().  The problems
 > with this are:

 >     - This only retrieves one value

 >     - Finding out the amount of memory in use shouldn't require installing
 >       mod_perl.

 >     - The HOW_BIG_IS_IT routine is not a documented interface for the
 >       Apache::SizeLimit module.

Please keep us informed what you find out and what you decide.

Regards,
-- 
andreas

Reply via email to