Gitiles
Code Review
Sign In
gerrit.hackerspace.pl
/
hscloud
/
b5ad364a32282694d4d51d0fb3d04441881acda1
/
.
/
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
}