All Projects → vbatts → go-cgroup

vbatts / go-cgroup

Licence: other
bindings for libcgroup

Programming Languages

go
31211 projects - #10 most used programming language

go-cgroup

Bindings to the libcgroup library

Notice

these bindings are incomplete

Installing

go get github.com/vbatts/go-cgroup

on debian, you'll need packages: golang, libcgroup-dev on fedora, you'll need packages: golang, libcgroup-devel

Sample

package main

import "github.com/vbatts/go-cgroup"
import "fmt"

func main() {
  cgroup.Init()

  fmt.Println(cgroup.GetSubSysMountPoint("cpu"))

  ctls, err := cgroup.GetAllControllers()
  if err != nil {
    fmt.Println(err)
    return
  }
  for i := range ctls {
    fmt.Println(ctls[i])
  }

}

Contributing

Fork and Pull Request please!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].