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
}

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

Source Files

oomparser.go

Directories

PathSynopsis
Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oominfo
Version
v0.13.2
Published
Mar 19, 2015
Platform
linux/amd64
Imports
10 packages
Last checked
50 seconds ago

Tools for package owners.