package fs2
import "github.com/opencontainers/cgroups/fs2"
Index ¶
- Constants
- func CheckMemoryUsage(dirPath string, r *cgroups.Resources) error
- func CreateCgroupPath(path string, c *cgroups.Cgroup) (Err error)
- func OOMKillCount(path string) (uint64, error)
- type Manager
- func NewManager(config *cgroups.Cgroup, dirPath string) (*Manager, error)
- func (m *Manager) Apply(pid int) error
- func (m *Manager) Destroy() error
- func (m *Manager) Exists() bool
- func (m *Manager) Freeze(state cgroups.FreezerState) error
- func (m *Manager) GetAllPids() ([]int, error)
- func (m *Manager) GetCgroups() (*cgroups.Cgroup, error)
- func (m *Manager) GetFreezerState() (cgroups.FreezerState, error)
- func (m *Manager) GetPaths() map[string]string
- func (m *Manager) GetPids() ([]int, error)
- func (m *Manager) GetStats() (*cgroups.Stats, error)
- func (m *Manager) OOMKillCount() (uint64, error)
- func (m *Manager) Path(_ string) string
- func (m *Manager) Set(r *cgroups.Resources) error
Constants ¶
const UnifiedMountpoint = "/sys/fs/cgroup"
Functions ¶
func CheckMemoryUsage ¶
func CreateCgroupPath ¶
CreateCgroupPath creates cgroupv2 path, enabling all the supported controllers.
func OOMKillCount ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates a manager for cgroup v2 unified hierarchy. dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". If dirPath is empty, it is automatically set using config.
func (*Manager) Apply ¶
func (*Manager) Destroy ¶
func (*Manager) Exists ¶
func (*Manager) Freeze ¶
func (m *Manager) Freeze(state cgroups.FreezerState) error
func (*Manager) GetAllPids ¶
func (*Manager) GetCgroups ¶
func (*Manager) GetFreezerState ¶
func (m *Manager) GetFreezerState() (cgroups.FreezerState, error)
func (*Manager) GetPaths ¶
func (*Manager) GetPids ¶
func (*Manager) GetStats ¶
func (*Manager) OOMKillCount ¶
func (*Manager) Path ¶
func (*Manager) Set ¶
Source Files ¶
cpu.go cpuset.go create.go defaultpath.go freezer.go fs2.go hugetlb.go io.go memory.go misc.go pids.go psi.go
- Version
- v0.0.1 (latest)
- Published
- Feb 28, 2025
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- 1 month ago –
Tools for package owners.