oomparser

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
}

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) error

calls a go routine that populates self.OomInstances and fills the argument channel with OomInstance objects as they are read from the file. opens the OomParser's systemFile which was set in getSystemFile to look for OOM messages by calling AnalyzeLines. Takes in the argument outStream, which is passed in by the user and passed to AnalyzeLines. OomInstance objects are added to outStream when they are found by AnalyzeLines

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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