Gitiles
Code Review
Sign In
gerrit.hackerspace.pl
/
hscloud
/
d45584aa6d15eb6390efdda9539296644aa6142e
/
.
/
go
/
statusz
/
load.go
blob: 2af5381dd46b94f06f46f9409130bec12bb377d3 [
file
] [
log
] [
blame
]
package statusz
import "github.com/shirou/gopsutil/load"
import "fmt"
func loadAverage() string {
loadstr := "unknown"
l, err := load.Avg()
if err == nil {
loadstr = fmt.Sprintf("%.2f %.2f %.2f", l.Load1, l.Load5, l.Load15)
}
return loadstr
}