oomprocesser

package
v0.0.0-...-04ee8bd Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEBPFProg

func GetEBPFProg() []byte

func WatchOOM

func WatchOOM(ch chan<- *OOMEvent)

Types

type OOMEvent

type OOMEvent struct {
	Pid        uint32 `json:"pid"`
	FComm      string `json:"fcomm"`
	CgroupID   uint32 `json:"cgroupID"`
	CgroupPath string `json:"cgroup_path"`
}

func DecodeMapItem

func DecodeMapItem(e []byte) *OOMEvent

type OomInstance

type OomInstance struct {
	// process id of the killed process
	Pid int
	// the name of the killed process
	ProcessName string
	// the time that the process was reported to be killed,
	// accurate to the minute
	TimeOfDeath time.Time
	// the absolute name of the container that OOMed
	ContainerName string
	// the absolute name of the container that was killed
	// due to the OOM.
	VictimContainerName string
	// the constraint that triggered the OOM.  One of CONSTRAINT_NONE,
	// CONSTRAINT_CPUSET, CONSTRAINT_MEMORY_POLICY, CONSTRAINT_MEMCG
	Constraint string
}

type OomParser

type OomParser struct {
	// contains filtered or unexported fields
}

func New

func New() (*OomParser, error)

func (*OomParser) StreamOoms

func (p *OomParser) StreamOoms(outStream chan<- *OomInstance)

Jump to

Keyboard shortcuts

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