Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a long running process on a server running Ubuntu Server 9.10. I would like to make it run under the SCHED_IDLE policy using the chrt command. However, after reading the man page, I can't manage to understand the proper way to issue the command for a running process.

I've tried unsuccessfully:

# chrt -i -p 688
pid 688's current scheduling policy: SCHED_OTHER
pid 688's current scheduling priority: 0
# chrt -p -i 688
pid 688's current scheduling policy: SCHED_OTHER
pid 688's current scheduling priority: 0
# chrt -p 688 -i
chrt: failed to set pid 0's policy: Invalid argument

I'll keep trying, but do you know how to do what I want?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Wow. After checking the web for examples, I found this page at ibm.com, which gives an example how to set the scheduling policy of a running process to SCHED_FIFO:

# chrt -p -f 35 13826

35, obviously, being the priority of the process in the SCHED_FIFO policy. So I just tried to use a dummy 0 priority:

# chrt -p -i 0 688
# chrt -p 688
pid 688's current scheduling policy: SCHED_IDLE
pid 688's current scheduling priority: 0

and was successful.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.