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