On the AIX 7.1 boxen I have access to, /proc/$pid/status is readable only by the process owner.
There is also data in /proc/$pid/psinfo, but the way that psutil/_psutil_aix.c reads them makes this other data less usable than it needs to be for non-owned processes.
In psutil_proc_cpu_times(), it only looks at /status. There is also partial information in /psinfo, but it doesn't try to use that.
In psutil_proc_basic_info(), it pulls many things from /psinfo, but also if the process isn't a zombie or exiting will try to pull the process status from /status. In which case it will fail for non-owned processes, and none of the other information returned by psutil_proc_basic_info() will be available either.
I have a patch I've been using, but it just swallows EACCES errors and returns partial information. Which I suspect isn't suitable.
On the AIX 7.1 boxen I have access to,
/proc/$pid/status
is readable only by the process owner.There is also data in
/proc/$pid/psinfo
, but the way thatpsutil/_psutil_aix.c
reads them makes this other data less usable than it needs to be for non-owned processes.In
psutil_proc_cpu_times()
, it only looks at/status
. There is also partial information in/psinfo
, but it doesn't try to use that.In
psutil_proc_basic_info()
, it pulls many things from/psinfo
, but also if the process isn't a zombie or exiting will try to pull the process status from/status
. In which case it will fail for non-owned processes, and none of the other information returned bypsutil_proc_basic_info()
will be available either.I have a patch I've been using, but it just swallows
EACCES
errors and returns partial information. Which I suspect isn't suitable.