Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Perl Memory Management

by IDStewart (Acolyte)
on Sep 27, 2001 at 18:44 UTC ( #115108=perlquestion: print w/replies, xml ) Need Help??
IDStewart has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way in perl (short of resorting to system()) to determine the amount of memory used by a particular process?

TIA,
Ian

Replies are listed 'Best First'.
Re: Perl Memory Management
by jeroenes (Priest) on Sep 27, 2001 at 19:03 UTC
      CPAN is your friend, as always. (there is even a nifty nodelet in User settings.) Try Proc::ProcessTable if you are on unix... or search for 'Proc' on search.cpan.org.

      Looks promising. Pitty it won't build on Solaris...

      Oh well. It least I know where to start digging...

      In addition to this, I have recently posted some code to Q&A which will return process memory usage via the Proc::ProcessTable module. The Q&A thread where this can can be found is here.

       

      Ooohhh, Rob no beer function well without!

Re: Perl Memory Management
by perrin (Chancellor) on Sep 27, 2001 at 18:54 UTC
    Not a good one, but there are modules that do it with other programs or libraries, like GTop.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://115108]
Approved by root
help
Chatterbox?
[Corion]: I think that ITIL is mostly to prevent people from doing harm to a system that basically runs unattended :)
[Corion]: Maybe you could reduce ITIL to a computer network, a man and a dog. The network runs the computations. The man is there to feed the dog. The dog is there to prevent the man from accessing the computers.
[marto]: from experience of this side of the fence, it's all about proving to people that you are ITIL compliant, then the client ignores logical processes anyway :P
[marto]: when you work on the outside, for a client, you can make them aware of the stupids, but they don' t always listen :/
[Corion]: Yeah, you can lead them to water, but it's illegal to drown them...
[Discipulus]: Here my solution marto: create a win fake machine insied AD. do a micro fake partition foreach remote partition you wont to monit. put a web server that acept from data from remote systems and full fake partition as needed. fake partition are Mb. ;=)
[marto]: Discipulus yeah, the nuclear industry love fake machines sitting around on a controlled domain :P
[marto]: changing a typo on a website is often a great deal of paper work :P

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-01-24 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.