参考:NICE, GETPRIORITY
実行結果
$ sudo ./getprio [sudo] ****** のパスワード: priority = 0 priority = -1 priority = -1
別ターミナルから確認
$ cat /proc/`pidof getprio`/sched | grep -e policy -e prio getprio (96338, #threads: 1) policy : 0 prio : 120 $ cat /proc/`pidof getprio`/stat | awk -F' ' '{print $18,$19}' 20 0 ※ priority を -1 に設定後、確認 $ cat /proc/`pidof getprio`/sched | grep -e policy -e prio getprio (96338, #threads: 1) policy : 0 prio : 119 $ cat /proc/`pidof getprio`/stat | awk -F' ' '{print $18,$19}' 19 -1 $