Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How to tell if script sucks...memory

by AltBlue (Chaplain)
on Feb 03, 2007 at 10:54 UTC ( [id://598067]=note: print w/replies, xml ) Need Help??


in reply to How to tell if script sucks...memory

As you mention Debian (a GNU/Linux distro), I'll throw in my .02$: check out the Linux namespace on CPAN. You'll find lots of Linux specific packages that could leverage your fiddlings. For instance, one module I personally tend to overuse from time to time is Linux::Smaps. Here's a sample usage:
$ perl -MLinux::Smaps -le '$sm = Linux::Smaps->new($$); \ sub psize { $sm->update; print $sm->size; } \ psize(); require POSIX; psize(); POSIX->import; psize();' 6312 6560 7088
If you want something even more fancy, try GTop. Here's a sample usage:
$ perl -MGTop -le '$gtop = GTop->new; \ sub psize { print $gtop->proc_mem($$)->size; } \ psize(); require POSIX; psize(); POSIX->import; psize();' 7839744 7958528 8499200

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://598067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-06-14 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.