def _get_rt(self, pid):
		scheduler = schedutils.get_scheduler(pid)
		sched_str = schedutils.schedstr(scheduler)
		priority = schedutils.get_priority(pid)
		log.debug("Read scheduler policy '%s' and priority '%d' of PID '%d'"
				% (sched_str, priority, pid))
		return (scheduler, priority)
Exemple #2
0
def show_settings(pid):
	policy = schedutils.get_scheduler(pid)
	spolicy = schedutils.schedstr(policy)
	rtprio = schedutils.get_priority(pid)
	reset_on_fork = ""
	if policy & schedutils.SCHED_RESET_ON_FORK:
		reset_on_fork = "|SCHED_RESET_ON_FORK"
	print '''pid %d's current scheduling policy: %s%s
pid %d's current scheduling priority: %d''' % (pid, spolicy, reset_on_fork, pid, rtprio)
Exemple #3
0
def show_settings(pid):
    policy = schedutils.get_scheduler(pid)
    spolicy = schedutils.schedstr(policy)
    rtprio = schedutils.get_priority(pid)
    reset_on_fork = ""
    if policy & schedutils.SCHED_RESET_ON_FORK:
        reset_on_fork = "|SCHED_RESET_ON_FORK"
    print '''pid %d's current scheduling policy: %s%s
pid %d's current scheduling priority: %d''' % (pid, spolicy, reset_on_fork,
                                               pid, rtprio)
Exemple #4
0
 def get_priority(self, pid):
     return schedutils.get_priority(pid)