Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common types and operations for cgroup controllers.
Synopsis
- newtype Controller a = Controller {
- unController :: Path Abs Dir
- resolveCGroupController :: Text -> IO (Controller a)
- resolveCGroupController' :: Path Abs File -> Path Abs File -> Text -> IO (Controller a)
cgroup controllers
newtype Controller a Source #
A cgroup (v1) controller path for a specific subsystem
Instances
Show (Controller a) Source # | |
Defined in System.CGroup.V1.Controller showsPrec :: Int -> Controller a -> ShowS # show :: Controller a -> String # showList :: [Controller a] -> ShowS # | |
Eq (Controller a) Source # | |
Defined in System.CGroup.V1.Controller (==) :: Controller a -> Controller a -> Bool # (/=) :: Controller a -> Controller a -> Bool # | |
Ord (Controller a) Source # | |
Defined in System.CGroup.V1.Controller compare :: Controller a -> Controller a -> Ordering # (<) :: Controller a -> Controller a -> Bool # (<=) :: Controller a -> Controller a -> Bool # (>) :: Controller a -> Controller a -> Bool # (>=) :: Controller a -> Controller a -> Bool # max :: Controller a -> Controller a -> Controller a # min :: Controller a -> Controller a -> Controller a # |
resolveCGroupController :: Text -> IO (Controller a) Source #
Resolve a cgroup (v1) controller by name, as viewed by 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 controller is not able to be found, or when running outside of a cgroup