memoru usage of process

  • Thread starter =?ISO-8859-2?Q?Jacek_Pop=B3awski?=
  • Start date
?

=?ISO-8859-2?Q?Jacek_Pop=B3awski?=

I need to know how much memory uses child process (after
subprocess.Popen), so I want function:

get_memory_usage(pid)

I found two ways:

- call "ps" and analyze its output - this is not portable (different
output on Linux, Cygwin and QNX)

- use resource.getrusage - but it works for self/children, not for
single process with given pid

Do you know any ideas how to do it in Python?
 
M

MrJean1

What do you mean by 'Python way' and 'not related to Python'?

How is parsing the output of 'ps' different from the method used in
recipe 286222?

/Jean Brouwers
 

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

Forum statistics

Threads
474,264
Messages
2,571,323
Members
48,006
Latest member
TerranceCo

Latest Threads

Top