proc

package
v1.18.10 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteInNetNs

func ExecuteInNetNs(newNs, curNs netns.NsHandle, f func() error) error

func GetCmdline

func GetCmdline(pid uint32) []byte

func GetHostNetNs

func GetHostNetNs() (netns.NsHandle, error)

func GetMountInfo

func GetMountInfo(pid uint32) map[string]MountInfo

func GetNetNs

func GetNetNs(pid uint32) (netns.NsHandle, error)

func GetNsIps

func GetNsIps(ns netns.NsHandle) ([]netaddr.IP, error)

func GetNsPid added in v1.4.0

func GetNsPid(pid uint32) uint32

func GetSelfNetNs

func GetSelfNetNs() (netns.NsHandle, error)

func HostPath

func HostPath(p string) string

func ListPids

func ListPids() ([]uint32, error)

func Path

func Path(pid uint32, subpath ...string) string

func ReadCgroup

func ReadCgroup(pid uint32) (*cgroup.Cgroup, error)

Types

type FSStat

type FSStat struct {
	CapacityBytes uint64
	UsedBytes     uint64
	ReservedBytes uint64
}

func StatFS

func StatFS(dirPath string) (FSStat, error)

type Fd added in v1.0.13

type Fd struct {
	Fd   uint64
	Dest string

	SocketInode string
}

func ReadFds added in v1.0.13

func ReadFds(pid uint32) ([]Fd, error)

type FdInfo

type FdInfo struct {
	MntId string
	Flags int
	Dest  string
}

func GetFdInfo

func GetFdInfo(pid uint32, fd uint64) *FdInfo

type MountInfo

type MountInfo struct {
	MajorMinor string
	MountPoint string
}

type Sock

type Sock struct {
	Inode  string
	SAddr  netaddr.IPPort
	DAddr  netaddr.IPPort
	Listen bool
}

func GetSockets

func GetSockets(pid uint32) ([]Sock, error)

Jump to

Keyboard shortcuts

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