package cgroups
import "github.com/dotcloud/docker/pkg/cgroups"
Index ¶
- func FindCgroupMountpoint(subsystem string) (string, error)
- func GetInitCgroupDir(subsystem string) (string, error)
- func GetThisCgroupDir(subsystem string) (string, error)
- type ActiveCgroup
- type Cgroup
Functions ¶
func FindCgroupMountpoint ¶
https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
func GetInitCgroupDir ¶
func GetThisCgroupDir ¶
Returns the relative path to the cgroup docker is running in.
Types ¶
type ActiveCgroup ¶
type ActiveCgroup interface { Cleanup() error }
type Cgroup ¶
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) MemorySwap int64 `json:"memory_swap,omitempty"` // Total memory usage (memory + swap); set `-1' to disable swap int64 `json:"cpu_shares,omitempty"` // CPU shares (relative weight vs. other containers) CpusetCpus string `json:"cpuset_cpus,omitempty"` // CPU to use UnitProperties [][2]string `json:"unit_properties,omitempty"` // systemd unit properties }
func (*Cgroup) Apply ¶
func (c *Cgroup) Apply(pid int) (ActiveCgroup, error)
Source Files ¶
apply_nosystemd.go apply_raw.go cgroups.go
- Version
- v0.10.0
- Published
- Apr 8, 2014
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 1 minute ago –
Tools for package owners.