Linux Thread Priority
Feb 24, 2021
$ chrt -m
SCHED_OTHER min/max priority : 0/0
SCHED_FIFO min/max priority : 1/99
SCHED_RR min/max priority : 1/99
SCHED_BATCH min/max priority : 0/0
SCHED_IDLE min/max priority : 0/0
SCHED_DEADLINE min/max priority : 0/0
A simple bash function to print the top statistics of yourapp($1) and threadname($2).
// usage topapp yourappname threadnamefunction topapp(){
while [ 1 ]
do
sleep 0.1;
local PID=`pidof $1`
if [ $PID > 0 ]; then
top -d 0.1 -H -p `pidof $1` | grep $2;
fi
done
}