kubernetes: k8s.io/kubernetes/pkg/util/procfs Index | Files

package procfs

import "k8s.io/kubernetes/pkg/util/procfs"

Package procfs implements utility functions relating to the /proc mount.

Index

Package Files

doc.go procfs.go procfs_fake.go procfs_linux.go

func PKill Uses

func PKill(name string, sig syscall.Signal) error

Find process(es) using a regular expression and send a specified signal to each process

func PidOf Uses

func PidOf(name string) ([]int, error)

Find process(es) with a specified name (regexp match) and return their pid(s)

type FakeProcFS Uses

type FakeProcFS struct{}

func (*FakeProcFS) GetFullContainerName Uses

func (fakePfs *FakeProcFS) GetFullContainerName(pid int) (string, error)

GetFullContainerName gets the container name given the root process id of the container. E.g. if the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.

type ProcFS Uses

type ProcFS struct{}

func (*ProcFS) GetFullContainerName Uses

func (pfs *ProcFS) GetFullContainerName(pid int) (string, error)

getFullContainerName gets the container name given the root process id of the container. E.g. if the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.

type ProcFSInterface Uses

type ProcFSInterface interface {
    // GetFullContainerName gets the container name given the root process id of the container.
    GetFullContainerName(pid int) (string, error)
}

func NewFakeProcFS Uses

func NewFakeProcFS() ProcFSInterface

func NewProcFS Uses

func NewProcFS() ProcFSInterface

Package procfs imports 14 packages (graph) and is imported by 247 packages. Updated 2019-05-31. Refresh now. Tools for package owners.