proc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 GetProcNS

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

GetProcNS 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