Documentation
¶
Overview ¶
Package oomwatch provides a way to detect near OOM conditions.
Index ¶
Constants ¶
View Source
const ( // DefaultCgroupPath is the default path to the cgroup directory. DefaultCgroupPath = "/sys/fs/cgroup/" // MemoryMaxFile is the cgroup memory.max filename. MemoryMaxFile = "memory.max" // MemoryCurrentFile is the cgroup memory.current filename. MemoryCurrentFile = "memory.current" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher can be used to detect near OOM conditions.
func New ¶
func New(memoryMaxPath, memoryCurrentPath string, memoryUsagePercentThreshold uint8, interval time.Duration, logger logr.Logger) (*Watcher, error)
New returns a new Watcher.
Click to show internal directories.
Click to hide internal directories.