3

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?

ΤΖΩΤΖΙΟΥ
  • 1,048
  • 1
  • 10
  • 19

1 Answers1

3

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.

ΤΖΩΤΖΙΟΥ
  • 1,048
  • 1
  • 10
  • 19