blob: 2af5381dd46b94f06f46f9409130bec12bb377d3 [file] [log] [blame]
Sergiusz Bazanski1affad42019-04-06 01:21:04 +02001package statusz
2
3import "github.com/shirou/gopsutil/load"
4
5import "fmt"
6
7func loadAverage() string {
8 loadstr := "unknown"
9 l, err := load.Avg()
10 if err == nil {
11 loadstr = fmt.Sprintf("%.2f %.2f %.2f", l.Load1, l.Load5, l.Load15)
12 }
13 return loadstr
14}