package oomparser

import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser"

Index

Types

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
}

struct that contains information related to an OOM kill instance

type OomParser

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

struct to hold file from which we obtain OomInstances

func New

func New() (*OomParser, error)

initializes an OomParser object and calls getSystemFile to set the systemFile attribute. Returns and OomParser object and an error

func (*OomParser) StreamOoms

func (self *OomParser) StreamOoms(outStream chan *OomInstance)

Calls goroutine for readLinesFromFile, which feeds it complete lines. Lines are checked against a regexp to check for the pid, process name, etc. At the end of an oom message group, StreamOoms adds the new oomInstance to oomLog

Source Files

oomparser.go

Directories

PathSynopsis
Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample
Version
v1.1.4-beta.0
Published
Dec 7, 2015
Platform
linux/amd64
Imports
11 packages
Last checked
57 seconds ago

Tools for package owners.