Represents an OS process.
Create a new Process object, raises NoSuchProcess if the PID does not exist, and ValueError if the parameter is not an integer PID.
The command line process has been called with.
The process creation time as a floating point number expressed in seconds since the epoch, in UTC.
The process executable as an absolute path name.
Return the children of this process as a list of Process objects.
Return connections opened by process as a list of namedtuples. The kind parameter filters for connections that fit the following criteria:
Kind Value Connections using inet IPv4 and IPv6 inet4 IPv4 inet6 IPv6 tcp TCP tcp4 TCP over IPv4 tcp6 TCP over IPv6 udp UDP udp4 UDP over IPv4 udp6 UDP over IPv6 all the sum of all the possible families and protocols
Return a float representing the current process CPU utilization as a percentage.
When interval is > 0.0 compares process times to system CPU times elapsed before and after the interval (blocking).
When interval is 0.0 or None compares process times to system CPU times elapsed since last call, returning immediately. In this case is recommended for accuracy that this function be called with at least 0.1 seconds between calls.
Return a tuple whose values are process CPU user and system times. The same as os.times() but per-process.
Return process I/O statistics as a namedtuple including the number of read/write calls performed and the amount of bytes read and written by the process.
Return process I/O niceness (priority) as a namedtuple.
Return a tuple representing RSS (Resident Set Size) and VMS (Virtual Memory Size) in bytes.
On UNIX RSS and VMS are the same values shown by ps.
On Windows RSS and VMS refer to “Mem Usage” and “VM Size” columns of taskmgr.exe.
Compare physical system memory to process resident memory and calculate process memory utilization as a percentage.
Return the number of threads used by this process.
Return files opened by process as a list of namedtuples including absolute file name and file descriptor number.
Return threads opened by process as a list of namedtuples including thread id and thread CPU times (user/system).
Return a string representing the process current working directory.
Return a named tuple denoting the process real, effective, and saved group ids.
Return whether this process is running.
Kill the current process.
The process name.
Get or set process niceness (priority).
Return the parent process as a Process object. If no parent pid is known return None.
The process pid.
The process parent pid.
Resume process execution.
Send a signal to process (see signal module constants). On Windows only SIGTERM is valid and is treated as an alias for kill().
Set process I/O niceness (priority). ioclass is one of the IOPRIO_CLASS_* constants. iodata is a number which goes from 0 to 7. The higher the value, the lower the I/O priority of the process.
The process current status as a STATUS_* constant.
Suspend process execution.
The terminal associated with this process, if any, else None.
Terminate the process with SIGTERM. On Windows this is an alias for kill().
Return a named tuple denoting the process real, effective, and saved user ids.
The name of the user that owns the process. On UNIX this is calculated by using real process uid.
Wait for process to terminate and, if process is a children of the current one also return its exit code, else None.