sysctl

package
v1.4.5-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VmOvercommitMemory = "vm/overcommit_memory"
	VmPanicOnOOM       = "vm/panic_on_oom"
	KernelPanic        = "kernel/panic"
	KernelPanicOnOops  = "kernel/panic_on_oops"

	VmOvercommitMemoryAlways    = 1 // kernel performs no memory over-commit handling
	VmPanicOnOOMInvokeOOMKiller = 0 // kernel calls the oom_killer function when OOM occurs

	KernelPanicOnOopsAlways  = 1  // kernel panics on kernel oops
	KernelPanicRebootTimeout = 10 // seconds after a panic for the kernel to reboot
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// GetSysctl returns the value for the specified sysctl setting
	GetSysctl(sysctl string) (int, error)
	// SetSysctl modifies the specified sysctl flag to the new value
	SetSysctl(sysctl string, newVal int) error
}

An injectable interface for running sysctl commands.

func New

func New() Interface

New returns a new Interface for accessing sysctl

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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