And for the ram used by perl you can do this also...
print `memstat |grep perl`;
you can ask for a specific process also, following the former example
print `memstat -p 28892`;
__END__
592k: PID 5273 (/usr/bin/perl)
116k( 108k): /lib/ld-linux.so.2 28892
92k( 84k): [08:01]:258781 28892
44k( 36k): [08:01]:258783 28892
16k( 8k): [08:01]:258784 28892
152k( 144k): [08:01]:258791 28892
1372k( 1356k): [08:01]:258796 28892
1404k( 1396k): /usr/bin/perl 28892
1500k( 0k): [08:06]:242490 28892
--------
5288k ( 3132k)
for memory use inside a specific part of a perl script see also malloc() and memstat() or -DL and warn('!') marks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.