MCPcopy Create free account
hub / github.com/containers/common / Stat

Method Stat

pkg/cgroups/cgroups.go:623–640  ·  view source on GitHub ↗

Stat returns usage statistics for the cgroup

()

Source from the content-addressed store, hash-verified

621
622// Stat returns usage statistics for the cgroup
623func (c *CgroupControl) Stat() (*Metrics, error) {
624 m := Metrics{}
625 found := false
626 for _, h := range handlers {
627 if err := h.Stat(c, &m); err != nil {
628 if !os.IsNotExist(errors.Cause(err)) {
629 return nil, err
630 }
631 logrus.Warningf("Failed to retrieve cgroup stats: %v", err)
632 continue
633 }
634 found = true
635 }
636 if !found {
637 return nil, ErrStatCgroup
638 }
639 return &m, nil
640}
641
642func readCgroup2MapPath(path string) (map[string][]string, error) {
643 ret := map[string][]string{}

Callers

nothing calls this directly

Calls 1

StatMethod · 0.65

Tested by

no test coverage detected