cgroups

package
v0.10.1-0...-a368c0d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("mountpoint not found")
)

Functions

func GetInitCgroupDir added in v0.9.0

func GetInitCgroupDir(subsystem string) (string, error)

func GetThisCgroupDir

func GetThisCgroupDir(subsystem string) (string, error)

Returns the relative path to the cgroup docker is running in.

Types

type ActiveCgroup added in v0.10.0

type ActiveCgroup interface {
	Cleanup() error
}

type Cgroup added in v0.9.0

type Cgroup struct {
	Name   string `json:"name,omitempty"`
	Parent string `json:"parent,omitempty"`

	DeviceAccess      bool   `json:"device_access,omitempty"`      // name of parent cgroup or slice
	Memory            int64  `json:"memory,omitempty"`             // Memory limit (in bytes)
	MemoryReservation int64  `json:"memory_reservation,omitempty"` // Memory reservation or soft_limit (in bytes)
	MemorySwap        int64  `json:"memory_swap,omitempty"`        // Total memory usage (memory + swap); set `-1' to disable swap
	CpuShares         int64  `json:"cpu_shares,omitempty"`         // CPU shares (relative weight vs. other containers)
	CpuQuota          int64  `json:"cpu_quota,omitempty"`          // CPU hardcap limit (in usecs). Allowed cpu time in a given period.
	CpuPeriod         int64  `json:"cpu_period,omitempty"`         // CPU period to be used for hardcapping (in usecs). 0 to use system default.
	CpusetCpus        string `json:"cpuset_cpus,omitempty"`        // CPU to use

	UnitProperties [][2]string `json:"unit_properties,omitempty"` // systemd unit properties
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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