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 ¶
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