Skip to main content

Module proc

Module proc 

Source
Expand description

This module provides utilities about processing process information(e.g. comm, argv, envp).

Structs§

BaselineInfo
Cred
EnvDiff
FdFlags
FileDescriptorInfo
FileDescriptorInfoCollection
ProcStatus

Enums§

CgroupError
Error variants for cgroup resolution.
CgroupInfo
Information about the cgroup of a process at the time of exec.
CredInspectError
Fallible
Interpreter

Functions§

cached_str
cached_string
diff_env
parse_env_entry
parse_failiable_envp
parse_proc_cgroup
Parse the contents of /proc/pid/cgroup. For cgroupv2: the line is 0::<path>. For cgroupv1: hierarchy-ID is non-zero and controller-list is non-empty.
read_argv
read_cgroup
Read the cgroup path from /proc/{pid}/cgroup. Returns CgroupInfo::V2 if a cgroupv2 entry is found, CgroupInfo::V1Only if only v1 entries exist.
read_comm
read_cwd
read_exe
read_fd
read_fdinfo
Read /proc/{pid}/fdinfo/{fd} to get more information about the file descriptor.
read_fds
read_interpreter
read_interpreter_recursive
read_status
resolve_cgroup_id
Resolve a cgroupv2 ID (inode number) to its path by walking /sys/fs/cgroup. Returns CgroupInfo::V2 if the cgroup is found, CgroupInfo::Error otherwise.