- def set_sched(self, shares = 32, besteffort = True):
- # for the old CKRM scheduler
- if cpulimit.checkckrm() is True:
- cpulimit.cpuinit()
- cpulimit.vs2ckrm_on(self.name)
- try:
- cpulimit.cpulimit(self.name,shares)
- except OSError, ex:
- if ex.errno == 22:
- print "invalid shares argument"
- # should re-raise exception?!