summaryrefslogtreecommitdiff
path: root/state/process/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'state/process/state.go')
-rw-r--r--state/process/state.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/state/process/state.go b/state/process/state.go
index f88f8b03..d49d526f 100644
--- a/state/process/state.go
+++ b/state/process/state.go
@@ -54,23 +54,3 @@ func WorkerProcessState(w worker.BaseProcess) (*State, error) {
MemoryUsage: i.RSS,
}, nil
}
-
-func GeneralProcessState(pid int, command string) (State, error) {
- const op = errors.Op("process_state")
- p, _ := process.NewProcess(int32(pid))
- i, err := p.MemoryInfo()
- if err != nil {
- return State{}, errors.E(op, err)
- }
- percent, err := p.CPUPercent()
- if err != nil {
- return State{}, err
- }
-
- return State{
- CPUPercent: percent,
- Pid: pid,
- MemoryUsage: i.RSS,
- Command: command,
- }, nil
-}