chjwang / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

get_cpu_times()/get_memory_info() to return child process result without sudo #255

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Proposal

Currently on OSX get_cpu_times() and get_memory_info() crash unless you are 
running under sudo even if the process is a child process of the one making the 
request. This means that the only way to monitor the cpu/memory usage of a 
child is through parsing the output from the OS's ps command ... defeating the 
purpose of using psutil in the first place. Requiring the code to run using 
sudo is a security risk.

On what platforms would this be available?

OSX

Proposed API

No change.

Are there existent implementations we can use as an example?

Other platforms seem to work OK.

Please provide any additional information below.

Original issue reported on code.google.com by g.willgo...@telluricresearch.com on 28 Feb 2012 at 10:53