proc

package
v0.0.0-...-d4ca6f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllBinaryProcs

func GetAllBinaryProcs() (map[string][]uint32, error)

GetProcNS returns the namespace ID of a given namespace and process. To do so, it requires access to the /proc file system of the host, and CAP_SYS_PTRACE capability.

func GetMountNSFirstProcesses

func GetMountNSFirstProcesses() (map[int]int, error)

GetMountNSFirstProcesses return mapping between mount NS to its first process (aka, the process with the oldest start time in the mount NS)

func GetProcBinary

func GetProcBinary(pid uint) (string, error)

GetProcNS returns the namespace ID of a given namespace and process. To do so, it requires access to the /proc file system of the host, and CAP_SYS_PTRACE capability.

func GetProcNS

func GetProcNS(pid uint, nsName string) (int, error)

GetProcNS returns the namespace ID of a given namespace and process. To do so, it requires access to the /proc file system of the host, and CAP_SYS_PTRACE capability.

func GetProcessStartTime

func GetProcessStartTime(pid uint) (int, error)

GetProcessStartTime return the start time of the process using the procfs

Types

type ProcNS

type ProcNS struct {
	Cgroup          int
	Ipc             int
	Mnt             int
	Net             int
	Pid             int
	PidForChildren  int
	Time            int
	TimeForChildren int
	User            int
	Uts             int
}

func GetAllProcNS

func GetAllProcNS(pid uint) (*ProcNS, error)

GetAllProcNS return all the namespaces of a given process. To do so, it requires access to the /proc file system of the host, and CAP_SYS_PTRACE capability.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL