Title: RE: [Perl-unix-users] How do one determine the amount of memory used by an process within perl

Thank you for this information. I need to write this application to be able to run under Solaris and AIX. I need to detect memory leaks, is the process still active, etc. I hope that this will help you to understand what I am trying to-do.

Ronald Mundell
Support & Maintenance
Nedbank Ltd.
105 West
BG3
881-3751(011)
0834111107


-----Original Message-----
From: Bayard Bell [mailto:[EMAIL PROTECTED]]
Sent: 19 March 2003 08:08
To: Mundell, R. (Ronald)
Cc: Perl-Win32-Users (E-mail); Perl-Unix-Users (E-mail)
Subject: Re: [Perl-unix-users] How do one determine the amount of memory
used by an process within perl


"How" to do this?

That request doesn't necessarily make sense in a platform-independent
context, and it only gets you somewhere on a given platform if you
understand something about memory allocation for that platform.  Most
modern Unixes make a distinction between text pages or shared memory map
pages where the memory allocation is intended not to be a per-process
allocation and memory allocation made directly to a process
image-specific heap.  How much of this is resident will vary by VM.
Widely.

Proc::ProcessTable::Process objects can include information about memory
use, but the source code that I scanned for this module doesn't look to
have a Windows port.  More importantly, you can't make many assumptions
about the nature of a process ("process" doesn't mean the same thing on
say, Linux vs. Solaris) or its memory usage across platforms just
because its presented through the same interface.

Caveat emptor.

"Mundell, R. (Ronald)" wrote:
>
> Good day
>
> I am busy writing a script that will determine the status of an
> application. I also need to determine the amount of memory used by
> such an application. If anyone knows how to do this within perl please
> help. This solution needs to be platform independent.
>
> Ronald Mundell
> Application Support & Maintenance (Retail & Corporate)
> Nedbank Ltd.
> 105 West
> BG3
> 881-3751(011)
> 0834111107
>
> ----------------------------------------------------------------------
>
> This email and any accompanying attachments may contain confidential
> and proprietary information.  This information is private and
> protected by law and, accordingly, if you are not the intended
> recipient, you are requested to delete this entire communication
> immediately and are notified that any disclosure, copying or
> distribution, or taking any action based on this information is
> prohibited.
>
> Emails cannot be guaranteed to be secure or free of errors or
> viruses.  The sender does not accept any liability or responsibility
> for any interception, corruption, destruction, loss, late arrival or
> incompleteness of or tampering or interference with any of the
> information contained in this email or for its incorrect delivery or
> non-delivery for whatsoever reason or its effect on any electronic
> device of the recipient.
>
> If verification of this email or any attachment is required, please
> request a hard-copy version.
>
> ----------------------------------------------------------------------


This email and any accompanying attachments may contain confidential and proprietary information.  This information is private and protected by law and, accordingly, if you are not the intended recipient, you are requested to delete this entire communication immediately and are notified that any disclosure, copying or distribution, or taking any action based on this information is prohibited.

Emails cannot be guaranteed to be secure or free of errors or viruses.  The sender does not accept any liability or responsibility for any interception, corruption, destruction, loss, late arrival or incompleteness of or tampering or interference with any of the information contained in this email or for its incorrect delivery or non-delivery for whatsoever reason or its effect on any electronic device of the recipient.

If verification of this email or any attachment is required, please request a hard-copy version.


Reply via email to