For *NIX-based systems, I strongly recommend the usage of Proc::ProcessTable which I have reviewed previously on this site here - This module however is not portable to Windows as it relies upon information derived from /proc/XXX/stat files (much nicer than parsing ps output). Without resorting to much XS magic, I believe that this would be your best bet - I would welcome correction on this with a link or example :-)
Example usage of Proc::ProcessTable to determine a processes own memory utilisation, as either a definite size or a memory percentage, posted by myself can be at this node.
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
In reply to Re: taking memory snapshots with perl
by rob_au
in thread taking memory snapshots with perl
by d_i_r_t_y
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |