mirror of
https://github.com/vbatts/go-cgroup.git
synced 2024-11-27 02:45:39 +00:00
golang bindings for libcgroup
599fa1f9ff
* correct type of Cgroup.g * fix GetAllControllers, ECGEOF is indicator of end already reached so don't append cd again |
||
---|---|---|
cg.go | ||
LICENSE | ||
main.go | ||
README.md |
go-cgroup
Bindings to the libcgroup library
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
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!