psutil._psposix

Routines common to all posix systems.

Module Contents

pid_exists(pid)

Check whether pid exists in the current process table.

wait_pid(pid, timeout=None, proc_name=None)

Wait for process with pid ‘pid’ to terminate and return its exit status code as an integer.

If pid is not a children of os.getpid() (current process) just waits until the process disappears and return None.

If pid does not exist at all return None immediately.

Raise TimeoutExpired on timeout expired.

disk_usage(path)

Return disk usage associated with path. Note: UNIX usually reserves 5% disk space which is not accessible by user. In this function “total” and “used” values reflect the total and used disk space whereas “free” and “percent” represent the “free” and “used percent” user disk space.

get_terminal_map()

Get a map of device-id -> path as a dict. Used by Process.terminal()