golang bindings for libcgroup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vincent Batts d3db5c0037
README: format and notice
6 years ago
LICENSE adding bsd license 9 years ago
README.md README: format and notice 6 years ago
cg.go cg: add a unit test TestUidGid for cgroup_{set,get}_uid_gid() 6 years ago
cg_test.go cg: add a unit test TestUidGid for cgroup_{set,get}_uid_gid() 6 years ago
main.go controller_data ought to be read-only 6 years ago

README.md

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!