sysctl

package
v1.14.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	VmOvercommitMemory = "vm/overcommit_memory"
	VmPanicOnOOM       = "vm/panic_on_oom"
	KernelPanic        = "kernel/panic"
	KernelPanicOnOops  = "kernel/panic_on_oops"
	RootMaxKeys        = "kernel/keys/root_maxkeys"
	RootMaxBytes       = "kernel/keys/root_maxbytes"

	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

	RootMaxKeysSetting  = 1000000                 // Needed since docker creates a new key per container
	RootMaxBytesSetting = RootMaxKeysSetting * 25 // allocate 25 bytes per key * number of MaxKeys
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface added in v1.4.0

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 added in v1.4.0

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