func (m *Manager) GetPids() ([]int, error) { path, err := getSubsystemPath(m.Cgroups, "cpu") if err != nil { return nil, err } return cgroups.ReadProcsFile(path) }
func GetPids(c *cgroups.Cgroup) ([]int, error) { path, err := getSubsystemPath(c, "cpu") if err != nil { return nil, err } return cgroups.ReadProcsFile(path) }
func (m *Manager) GetPids() ([]int, error) { d, err := getCgroupData(m.Cgroups, 0) if err != nil { return nil, err } dir, err := d.path("devices") if err != nil { return nil, err } return cgroups.ReadProcsFile(dir) }
func GetPids(c *cgroups.Cgroup) ([]int, error) { d, err := getCgroupData(c, 0) if err != nil { return nil, err } dir, err := d.path("devices") if err != nil { return nil, err } return cgroups.ReadProcsFile(dir) }
func (m *Manager) GetPids() ([]int, error) { d, err := getCgroupData(m.Cgroups, 0) if err != nil { return nil, err } dir, err := d.path("devices") if err != nil { return nil, err } if !cgroups.PathExists(dir) { return nil, cgroups.NewNotFoundError("devices") } return cgroups.ReadProcsFile(dir) }
func GetPids(c *cgroups.Cgroup) ([]int, error) { unitName := getUnitName(c) mountpoint, err := cgroups.FindCgroupMountpoint("cpu") if err != nil { return nil, err } props, err := theConn.GetUnitTypeProperties(unitName, getIfaceForUnit(unitName)) if err != nil { return nil, err } cgroup := props["ControlGroup"].(string) return cgroups.ReadProcsFile(filepath.Join(mountpoint, cgroup)) }