cgroup-rts-threads-0.2.1.1: A container-/cgroup-aware substitute for the GHC RTS `-N` flag
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.CGroup.V2.CGroup

Description

Common types and operations for cgroups (v2)

Synopsis

Documentation

data CGroup Source #

A cgroup (under cgroups v2)

Constructors

CGroup 

Fields

Instances

Instances details
Show CGroup Source # 
Instance details

Defined in System.CGroup.V2.CGroup

Eq CGroup Source # 
Instance details

Defined in System.CGroup.V2.CGroup

Methods

(==) :: CGroup -> CGroup -> Bool #

(/=) :: CGroup -> CGroup -> Bool #

Ord CGroup Source # 
Instance details

Defined in System.CGroup.V2.CGroup

resolveCGroup :: IO CGroup Source #

Resolve the cgroup (v2) used for the current process

see cgroups(7): /proc/self/cgroup is a file that contains information about control groups applied to this process

see proc(5): /proc/self/mountinfo is a file that contains information about mounts available to this process

Throws an Exception when the cgroup is unable to be found, or when the current process is not running under cgroups v2

resolveCGroup' :: Path Abs File -> Path Abs File -> IO CGroup Source #

Resolve a cgroup (v2) from the given cgroup and mountinfo files

Throws an Exception when the cgroup is unable to be found, or when the provided paths do not construct a valid cgroup