MCPcopy Create free account
hub / github.com/prometheus/procfs / NewProc

Function NewProc

proc.go:59–65  ·  view source on GitHub ↗

NewProc returns a process for the given pid under /proc.

(pid int)

Source from the content-addressed store, hash-verified

57
58// NewProc returns a process for the given pid under /proc.
59func NewProc(pid int) (Proc, error) {
60 fs, err := NewFS(DefaultMountPoint)
61 if err != nil {
62 return Proc{}, err
63 }
64 return fs.Proc(pid)
65}
66
67// AllProcs returns a list of all currently available processes under /proc.
68func AllProcs() (Procs, error) {

Callers

nothing calls this directly

Calls 2

ProcMethod · 0.95
NewFSFunction · 0.70

Tested by

no test coverage detected