1
0
Fork 0
mirror of https://github.com/vbatts/go-cgroup.git synced 2024-11-23 09:05:39 +00:00
golang bindings for libcgroup
Find a file
Vincent Batts d3db5c0037
README: format and notice
Fixes #3

Add a notice that these bindings are incomplete

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-05-17 10:12:39 -04:00
cg.go cg: add a unit test TestUidGid for cgroup_{set,get}_uid_gid() 2017-05-07 12:48:31 +02:00
cg_test.go cg: add a unit test TestUidGid for cgroup_{set,get}_uid_gid() 2017-05-07 12:48:31 +02:00
LICENSE adding bsd license 2014-02-16 22:41:09 -05:00
main.go controller_data ought to be read-only 2016-11-29 09:24:35 -05:00
README.md README: format and notice 2017-05-17 10:12:39 -04:00

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!