Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 chanting in the Monastery: (4)
As of 2025-06-24 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.