Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get thread scheduling policy from console

Tags:

c

linux

Is this possible to figure out thread scheduling policy from linux console? I mean is it possible to receive something what pthread_getschedparam() returns but from console?

I need to figure out whatever policy is SCHED_FIFO, SCHED_RR or SCHED_OTHER.

like image 730
codewarrior Avatar asked Oct 25 '12 06:10

codewarrior


1 Answers

The command ps -eLfc will give you a list of threads running along with their scheduling policy under the row titled CLS. RR (Round Robin), TS (Time Sharing) are some of the scheduling policies that may be present. If you want to start a process and mention a particular scheduling policy for its threads then you can use command chrt.

like image 157
spitfire88 Avatar answered Oct 21 '22 06:10

spitfire88