get memory percent usage info

get memory percent usage info

am 31.08.2007 20:09:09 von Ken Killer

hi,

how to get a Perl program memory percent usage information within the
program itself, so that I can write that info to the stand out?

Re: get memory percent usage info

am 01.09.2007 14:22:13 von Spiros Denaxas

On Aug 31, 7:09 pm, Ken wrote:
> hi,
>
> how to get a Perl program memory percent usage information within the
> program itself, so that I can write that info to the stand out?

Hi,

If you are after the memory size of individual data structures, you
can use Devel::Size , found at http://search.cpan.org/~tels/Devel-Size-0.69/lib/Devel/Size. pm
.. If however you are after the memory footprint of the entire Perl
script, you would probably want to use Proc::ProccessTable, found at
http://search.cpan.org/~durist/Proc-ProcessTable-0.41/Proces sTable.pm.
This effective will return you a UNIX process table with all the
relevant information. You could locate your script easily by searching
for the PID in the table ( $$ ).

Hope this helps,
Spiros