return config.container.run(cmd, shell_bool=True)
else:
return Run.run(cmd, shell_bool=True)
+
+ @staticmethod
+ def get_pids_in_cgroup(config, cgroup, controller):
+ mounts = Cgroup.get_cgroup_mounts(config)
+
+ for mount in mounts:
+ if mount.controller == controller:
+ proc_file = os.path.join(mount.mount_point, cgroup, "cgroup.procs")
+ cmd = ['cat', proc_file]
+
+ if config.args.container:
+ return config.container.run(cmd, shell_bool=True)
+ else:
+ return Run.run(cmd, shell_bool=True)
+
+ return None