Skip to content

Commit

Permalink
working implementation using the new gopsutil
Browse files Browse the repository at this point in the history
  • Loading branch information
vrecan committed Dec 10, 2017
1 parent 93d16a4 commit a2f429b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 91 deletions.
91 changes: 0 additions & 91 deletions plugins/inputs/procstat/pgrep.go

This file was deleted.

7 changes: 7 additions & 0 deletions plugins/inputs/procstat/process.go
Expand Up @@ -23,6 +23,13 @@ type Process interface {
RlimitUsage(bool) ([]process.RlimitStat, error)
}

type PIDFinder interface {
PidFile(path string) ([]PID, error)
Pattern(pattern string) ([]PID, error)
Uid(user string) ([]PID, error)
FullPattern(path string) ([]PID, error)
}

type Proc struct {
hasCPUTimes bool
tags map[string]string
Expand Down
2 changes: 2 additions & 0 deletions plugins/inputs/procstat/procstat_test.go
@@ -1,3 +1,5 @@
// +build !windows

package procstat

import (
Expand Down

0 comments on commit a2f429b

Please sign in to comment.