mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Add proc_total and proc_run to loadavg collector
This commit is contained in:
parent
14bc29f766
commit
fd6f19ea07
@ -32,6 +32,11 @@ func (m *LoadavgCollector) Read(interval time.Duration) {
|
||||
m.node["load_five"] = float64(loadFive)
|
||||
loadFifteen, _ := strconv.ParseFloat(ls[2], 64)
|
||||
m.node["load_fifteen"] = float64(loadFifteen)
|
||||
lv := strings.Split(ls[3], `/`)
|
||||
proc_run, _ := strconv.ParseFloat(lv[0], 64)
|
||||
proc_total, _ := strconv.ParseFloat(lv[1], 64)
|
||||
m.node["proc_total"] = float64(proc_total)
|
||||
m.node["proc_run"] = float64(proc_run)
|
||||
}
|
||||
|
||||
func (m *LoadavgCollector) Close() {
|
||||
|
Loading…
Reference in New Issue
Block a user