I need to know how much memory uses child process (after
subprocess.Pope n), so I want function:
get_memory_usag e(pid)
I found two ways:
- call "ps" and analyze its output - this is not portable (different
output on Linux, Cygwin and QNX)
- use resource.getrus age - but it works for self/children, not for
single process with given pid
Do you know any ideas how to do it in Python?
subprocess.Pope n), so I want function:
get_memory_usag e(pid)
I found two ways:
- call "ps" and analyze its output - this is not portable (different
output on Linux, Cygwin and QNX)
- use resource.getrus age - but it works for self/children, not for
single process with given pid
Do you know any ideas how to do it in Python?
Comment