Home | History | Annotate | Download | only in cgroup

Lines Matching refs:Cgroup

4 Helpers for cgroup testing.
15 class Cgroup(object):
17 Cgroup handling class.
22 @param module: Name of the cgroup module
34 @param modules: Array of all available cgroup modules.
48 Creates new temporary cgroup
49 @param root: where to create this cgroup (default: self.root)
54 pwd = mkdtemp(prefix='cgroup-', dir=root) + '/'
56 pwd = mkdtemp(prefix='cgroup-', dir=self.root) + '/'
65 Removes cgroup.
67 @param pwd: cgroup directory.
97 Checks if the 'pid' process is in 'pwd' cgroup
99 @param pwd: cgroup directory
110 Checks if the 'pid' process is in root cgroup (WO cgroup)
119 Sets cgroup membership
121 @param pwd: cgroup directory
130 logging.error("cg.set_cgroup(): Setting %d pid into %s cgroup "
138 Resets the cgroup membership (sets to root)
149 @param pwd: cgroup directory
166 @param pwd: cgroup directory
186 @param pwd: cgroup directory
212 @param pwd: cgroup directory
242 logging.error("cg.smoke_test[%d]: Can't create cgroup", part)
263 # Change the cgroup
266 logging.error("cg.smoke_test[%d]: Could not set cgroup", part)
269 # Try to remove used cgroup
273 " the used cgroup", part)
276 # Return the process into the root cgroup
279 logging.error("cg.smoke_test[%d]: Could not return the root cgroup "
283 # It should be safe to remove the cgroup now
286 logging.error("cg.smoke_test[%d]: Can't remove cgroup directory",
303 Handles the list of different cgroup filesystems.
310 self.mountdir = mkdtemp(prefix='cgroup-') + '/'
320 logging.debug("Desired cgroup modules: %s", _modules)
325 if line[2] == 'cgroup':
343 cmd = ('mount -t cgroup -o %s %s %s' %
351 logging.info("Cgroup module '%s' not available", module)
353 logging.debug("Initialized cgroup modules: %s", self.modules[0])