Documentation ¶
Overview ¶
Package kernel parses Kernel wakesource files, and outputs CSV entries for integration with Historian v2.
Index ¶
Constants ¶
View Source
const ( // TimeLayout is the layout passed to time.Parse. TimeLayout = "2006-01-02 15:04:05" // PositiveTransition is the string for positive transitions in the Kernel wakesource file. PositiveTransition = "wakeup_source_activate" // NegativeTransition is the string for negative transitions in the Kernel wakesource file. NegativeTransition = "wakeup_source_deactivate" // KernelWakeSource is the csv description for the Kernel wakesource metric. KernelWakeSource = "Kernel Wakesource" )
Variables ¶
View Source
var ( // TraceFileRE is a regular expression to match the top line in a kernel trace file. TraceFileRE = regexp.MustCompile(`^# tracer: nop\n`) // WakeSourceRE is a regular expression to match a line in the Kernel wakesource file. // e.g. healthd-188 [001] d..2 "2015-05-28 19:50:27.636636" wakeup_source_activate: eventpoll state=0x176d0004 WakeSourceRE = regexp.MustCompile(`^` + `[^"]+` + `\s+` + `["]` + `(?P<timeStamp>[^.]+)` + `[.]` + `(?P<remainder>\d+)` + `["]` + `\s+` + `(?P<transitionType>\S+):` + `\s+` + `(?P<value>\S+)`) )
Functions ¶
func IsSupportedDevice ¶
IsSupportedDevice returns true if the kernel trace file is currently parseable for that device. 'device' should be device name (eg. hammerhead) and not model name (eg. Nexus 5).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.