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