func (self *dockerContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { c := &cgroups.Cgroup{ Parent: self.parent, Name: self.id, } return fs.GetPids(c) }
func getPids(config *cgroups.Cgroup) []int { pids, err := fs.GetPids(config) if err != nil { log.Fatal(err) } return pids }
func psAction(context *cli.Context) { config, err := getConfig(context) if err != nil { log.Fatal(err) } pids, err := fs.GetPids(config) if err != nil { log.Fatal(err) } fmt.Printf("Pids in '%s':\n", config.Name) fmt.Println(pids) }
func (d *driver) GetPidsForContainer(id string) ([]int, error) { d.Lock() active := d.activeContainers[id] d.Unlock() if active == nil { return nil, fmt.Errorf("active container for %s does not exist", id) } c := active.container.Cgroups if systemd.UseSystemd() { return systemd.GetPids(c) } return fs.GetPids(c) }
func (self *rawContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { return fs.GetPids(self.cgroup) }
func (self *dockerContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { return cgroup_fs.GetPids(&self.cgroup) }