All of these functions take a proc
argument; this can either be a psutil.Process
instance or an int
representing a process ID.
Linux | macOS | NetBSD | OpenBSD | DragonFlyBSD | FreeBSD |
:pyproc_getgroups() |
:pyproc_getgroups() |
:pyproc_getgroups() |
:pyproc_getgroups() |
:pyproc_getgroups() |
:pyproc_getgroups() 12 |
:pyproc_get_umask() |
:pyproc_getpgid() 3 |
:pyproc_getpgid() 4 |
:pyproc_getpgid() 5 |
:pyproc_getpgid() 6 |
:pyproc_getpgid() 7 |
:pyproc_get_sigmasks() |
:pyproc_get_sigmasks() |
:pyproc_getsid() 8 |
:pyproc_getsid() 9 |
:pyproc_getsid() 10 |
:pyproc_getsid() 11 |
:pyproc_get_sigmasks() |
:pyproc_get_sigmasks() |
:pyproc_get_sigmasks() |
|||
:pyproc_getrlimit() 12 |
Errors raised will vary slightly between functions and across platforms (for example, proc_rlimit()
and proc_getrlimit()
raise ValueError
for invalid resource values). However, here is the general rule:
psutil.Error
subclasses (psutil.NoSuchProcess
and psutil.AccessDenied
) are raised if there is one that directly corresponds to the error that occured. For most other cases, an OSError
is raised.
genindex
modindex
search
These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩On FreeBSD, calling
proc_getgroups()
inside aoneshot_proc()
will first attempt to retrieve the group list via a method that collects as much extra information as possible. However, this method may truncate the returned group list. In this case,proc_getgroups()
will fall back on the normal method, which avoids truncation.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩These functions, when called inside a
oneshot_proc()
context manager, will retrieve the requested information in a different way that collects as much extra information as possible about the process for later use.↩On DragonFlyBSD, the first call to
proc_getrlimit()
inside aoneshot_proc()
will retrieve all of the resource limits and cache them. Further calls toproc_getrlimit()
will use this cache.↩