nikademus79 / psutil

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

Provide per-process getresuid() and getresgid() methods #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This should reflect os.getresuid() [1] and os.getresgid() [2] Python functions 
but in a per-process fashion, and return a named tuple as such:

>>> p = psutil.Process(os.getpid)
>>> p.getresuid()
user(real=1000, effective=1000, saved=1000)
>>> p.getresgid()
group(real=1000, effective=1000, saved=1000)

This should be provided for UNIX systems only and raise AttributeError on 
Windows.

Not sure what to do with current "uid" and "gid" properties.
It probably makes sense to deprecate them.

[1] http://docs.python.org/library/os.html#os.getresuid 
[2] http://docs.python.org/library/os.html#os.getresgid

Original issue reported on code.google.com by g.rodola on 22 Nov 2010 at 12:29

GoogleCodeExporter commented 8 years ago
Implemented on Linux in r835.
I decided to provide this as "uids" and "gids" properties as they're easier to 
type/remember than "getresuid" and "getresgid".

Original comment by g.rodola on 22 Nov 2010 at 1:53

GoogleCodeExporter commented 8 years ago
Implemented for FreeBSD in r837.
Re-assigning to Jay for missing OSX implementation.

Original comment by g.rodola on 22 Nov 2010 at 2:45

GoogleCodeExporter commented 8 years ago
Implemented on OSX in r916.

Original comment by g.rodola on 17 Feb 2011 at 2:55

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 20 Mar 2011 at 9:55

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r835 == revision 28262c50be27
r837 == revision b5d7376dafd1
r916 == revision 5780f675d6e3

Original comment by g.rodola on 2 Mar 2013 at 11:57