1
0
Fork 0
mirror of https://github.com/vbatts/go-cgroup.git synced 2024-11-23 17:15:39 +00:00
golang bindings for libcgroup
Find a file
Vincent Batts 4c1b10f991 Merge pull request #1 from SjonHortensius/master
2 Bugfixes plus minor readability fix in main
2015-12-07 09:40:43 -05:00
cg.go 2 Bugfixes plus minor readability fix in main 2015-12-06 14:09:38 +01:00
LICENSE adding bsd license 2014-02-16 22:41:09 -05:00
main.go 2 Bugfixes plus minor readability fix in main 2015-12-06 14:09:38 +01:00
README.md adding package requirement notes 2014-02-16 21:06:40 -05:00

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!