def mountCgroups():
 mounts = quietRun('cat /proc/mounts')
 cgdir = '/sys/fs/cgroup'
 csdir = (cgdir + '/cpuset')
 if ((('cgroup %s' % cgdir) not in mounts) and (('cgroups %s' % cgdir) not in mounts)):
  raise Exception(('cgroups not mounted on ' + cgdir))
 if (('cpuset %s' % csdir) not in mounts):
  errRun(('mkdir -p ' + csdir))
  errRun(('mount -t cgroup -ocpuset cpuset ' + csdir))

def mountCgroups ( ) : mounts = quietRun ( 'cat /proc/mounts' ) cgdir = '/sys/fs/cgroup' csdir = ( cgdir + '/cpuset' ) if ( ( ( 'cgroup %s' % cgdir ) not in mounts ) and ( ( 'cgroups %s' % cgdir ) not in mounts ) ) : raise Exception ( ( 'cgroups not mounted on ' + cgdir ) ) if ( ( 'cpuset %s' % csdir ) not in mounts ) : errRun ( ( 'mkdir -p ' + csdir ) ) errRun ( ( 'mount -t cgroup -ocpuset cpuset ' + csdir ) )
make sure cgroups file system is mounted .