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

Method FileDescriptorsInfo

proc.go:312–329  ·  view source on GitHub ↗

FileDescriptorsInfo retrieves information about all file descriptors of the process.

()

Source from the content-addressed store, hash-verified

310// FileDescriptorsInfo retrieves information about all file descriptors of
311// the process.
312func (p Proc) FileDescriptorsInfo() (ProcFDInfos, error) {
313 names, err := p.fileDescriptors()
314 if err != nil {
315 return nil, err
316 }
317
318 var fdinfos ProcFDInfos
319
320 for _, n := range names {
321 fdinfo, err := p.FDInfo(n)
322 if err != nil {
323 continue
324 }
325 fdinfos = append(fdinfos, *fdinfo)
326 }
327
328 return fdinfos, nil
329}
330
331// Schedstat returns task scheduling information for the process.
332func (p Proc) Schedstat() (ProcSchedstat, error) {

Callers 2

TestInotifyWatchLenFunction · 0.80
TestFileDescriptorsInfoFunction · 0.80

Calls 2

fileDescriptorsMethod · 0.95
FDInfoMethod · 0.95

Tested by 2

TestInotifyWatchLenFunction · 0.64
TestFileDescriptorsInfoFunction · 0.64