get memory percent usage info

Discussion in 'Perl Misc' started by Ken, Aug 31, 2007.

  1. Ken

    Ken Guest

    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?
     
    Ken, Aug 31, 2007
    #1
    1. Advertising

  2. 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/ProcessTable.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
     
    Spiros Denaxas, Sep 1, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. metfan
    Replies:
    2
    Views:
    4,852
    Robert Olofsson
    Oct 21, 2003
  2. Ian
    Replies:
    3
    Views:
    405
    Jean Brouwers
    Jul 10, 2004
  3. hvt
    Replies:
    0
    Views:
    1,212
  4. hvt
    Replies:
    0
    Views:
    1,474
  5. Todd
    Replies:
    4
    Views:
    543
    Jeff Higgins
    Sep 5, 2007
Loading...

Share This Page