02 Aug 2015, 13:10

Access OS metrics from Golang


I’ve recently published StatGo, it gives you access to your operating system metrics like free memory, used disk spaces …

It’s a binding to the C library libstatgrab, a proven stable piece of code that works on many different systems, FreeBSD, Linux, OSX …

It’s very simple to use:

s := NewStat()
c := s.CPUStats()

Feel free to contribute, it may need some improvement but it’s working I’m using it in a small metrics web server to monitor small network of servers.

The code is on Github