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

Method GetProcMounts

mountinfo.go:201–207  ·  view source on GitHub ↗

GetProcMounts retrieves mountinfo information from a processes' `/proc/ /mountinfo`.

(pid int)

Source from the content-addressed store, hash-verified

199
200// GetProcMounts retrieves mountinfo information from a processes' `/proc/<pid>/mountinfo`.
201func (fs FS) GetProcMounts(pid int) ([]*MountInfo, error) {
202 data, err := readMountInfo(fs.proc.Path(fmt.Sprintf("%d/mountinfo", pid)))
203 if err != nil {
204 return nil, err
205 }
206 return parseMountInfo(data)
207}

Callers 1

TestFSMountInfoFunction · 0.95

Calls 3

readMountInfoFunction · 0.85
parseMountInfoFunction · 0.85
PathMethod · 0.45

Tested by 1

TestFSMountInfoFunction · 0.76