tracking memory usage

E

Erik Johnson

Sort of two questions here:

The first is about the internal view: are there Python introspection
functions that can be called such that a running script can keep tabs on how
much memory is being used?

And the second is about using either os or system calls on Windows such
that a Python script could get similar information about other processes
(i.e., external)?

Thanks,
-ej
 
K

kyosohma

Sort of two questions here:

The first is about the internal view: are there Python introspection
functions that can be called such that a running script can keep tabs on how
much memory is being used?

And the second is about using either os or system calls on Windows such
that a Python script could get similar information about other processes
(i.e., external)?

Thanks,
-ej
From what I've found, it would seem that this is in development. See
the following:

http://svn.python.org/projects/python/branches/bcannon-sandboxing/PEP.txt

I also found a cool recipe for doing some of what you want, but it's
only been tested on Linux. You might be able to modify it for your
needs, if you don't mind delving into process ids:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222

Good luck!

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top