Skip to content
Snippets Groups Projects
Commit 12357ee8 authored by Cameron Sparr's avatar Cameron Sparr
Browse files

processes: add 'unknown' procs (?)

parent bb254fc2
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ func getEmptyFields() map[string]interface{} {
"running": int64(0),
"sleeping": int64(0),
"total": int64(0),
"unknown": int64(0),
}
switch runtime.GOOS {
case "freebsd":
......@@ -114,6 +115,8 @@ func (p *Processes) gatherFromPS(fields map[string]interface{}) error {
fields["sleeping"] = fields["sleeping"].(int64) + int64(1)
case 'I':
fields["idle"] = fields["idle"].(int64) + int64(1)
case '?':
fields["unknown"] = fields["unknown"].(int64) + int64(1)
default:
log.Printf("processes: Unknown state [ %s ] from ps",
string(status[0]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment