sprio
设置指定线程的优先级。
格式
sprio <priority thread_id>
说明
[root@sylixos:/root]# help sprio
set thread priority.
notice : tid is HEX.
sprio [priority thread_id]
[root@sylixos:/root]#
此命令用来设置指定线程的优先级。
备注:
thread_id 是 16 进程。
样例
注意: ts
命令的作用是展示线程信息。详细字段信息参考 ts
命令。可执行程序后面的 & 表示将进程放在后台运行。
[root@sylixos:/apps/pthread_test]# ts
thread show >>
NAME TID PID PRI STAT LOCK SAFE DELAY PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0 4000000 0 255 RDY 0 YES 0 0 0
t_itimer 4000001 0 20 SLP 0 YES 74552 0 0
t_isrdefer 4000002 0 0 SEM 0 YES 0 0 0
t_except 4000003 0 0 SEM 0 YES 0 0 0
t_log 4000004 0 60 MSGQ 0 YES 0 0 0
t_power 4000005 0 254 SLP 0 YES 736 0 0
t_hotplug 4000006 0 250 SEM 0 YES 729 0 0
t_reclaim 4000008 0 253 MSGQ 0 YES 0 0 0
t_sync 4000009 0 252 SLP 0 733 0 0
t_dcwpipe 400000a 0 160 SEM 0 0 0 0
t_tpsfs 400000b 0 160 SLP 0 722 0 0
t_console 400000c 0 150 MSGQ 0 YES 0 0 0
t_netjob 400000d 0 110 SEM 0 YES 0 0 0
t_netproto 400000e 0 110 MSGQ 0 YES 33 0 0
t_snmp 400000f 0 110 MSGQ 0 YES 0 0 0
t_ftpd 4000010 0 160 MSGQ 0 0 0 0
t_telnetd 4000011 0 160 MSGQ 0 0 0 0
t_jobq 4000013 0 200 SEM 0 YES 0 0 0
t_xinput 4000015 0 200 SEM 0 0 0 0
t_xcondev 4000016 0 200 MSGQ 0 0 0 0
main.jsc 4000017 1 200 SEM 0 0 1 USE 0
t_tshell 4000018 0 150 RDY 1 0 0 0
t_tshell 400001a 0 150 SEM 0 0 0 0
jsre_timer 400001b 1 180 RDY 0 0 0 0
imgpull.jsc 400001c 1 200 SEM 0 0 0 USE 0
assistant.jsc 400001d 1 200 SEM 0 0 0 USE 0
thread: 26
[root@sylixos:/apps/pthread_test]# ./pthread_test1 &
[root@sylixos:/apps/pthread_test]# ts
thread show >>
NAME TID PID PRI STAT LOCK SAFE DELAY PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0 4000000 0 255 RDY 0 YES 0 0 0
t_itimer 4000001 0 20 SLP 0 YES 58285 0 0
t_isrdefer 4000002 0 0 SEM 0 YES 0 0 0
t_except 4000003 0 0 SEM 0 YES 0 0 0
t_log 4000004 0 60 MSGQ 0 YES 0 0 0
t_power 4000005 0 254 SLP 0 YES 472 0 0
t_hotplug 4000006 0 250 SEM 0 YES 463 0 0
t_reclaim 4000008 0 253 MSGQ 0 YES 0 0 0
t_sync 4000009 0 252 SLP 0 469 0 0
t_dcwpipe 400000a 0 160 SEM 0 0 0 0
t_tpsfs 400000b 0 160 SLP 0 456 0 0
t_console 400000c 0 150 MSGQ 0 YES 0 0 0
t_netjob 400000d 0 110 SEM 0 YES 0 0 0
t_netproto 400000e 0 110 MSGQ 0 YES 67 0 0
t_snmp 400000f 0 110 MSGQ 0 YES 0 0 0
t_ftpd 4000010 0 160 MSGQ 0 0 0 0
t_telnetd 4000011 0 160 MSGQ 0 0 0 0
t_jobq 4000013 0 200 SEM 0 YES 0 0 0
t_xinput 4000015 0 200 SEM 0 0 0 0
t_xcondev 4000016 0 200 MSGQ 0 0 0 0
main.jsc 4000017 1 200 SEM 0 0 1 USE 0
t_tshell 4000018 0 150 RDY 1 0 0 0
t_tshell 400001a 0 150 SEM 0 0 0 0
jsre_timer 400001b 1 180 VUTX 0 1248 0 0
imgpull.jsc 400001c 1 200 SEM 0 0 0 USE 0
assistant.jsc 400001d 1 200 SEM 0 0 0 USE 0
pthread_test1 400001f 3 200 SLP 0 17 1 USE 0
thread: 27
[root@sylixos:/apps/pthread_test]# sprio 240 400001f
[root@sylixos:/apps/pthread_test]# ts
thread show >>
NAME TID PID PRI STAT LOCK SAFE DELAY PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0 4000000 0 255 RDY 0 YES 0 0 0
t_itimer 4000001 0 20 SLP 0 YES 31892 0 0
t_isrdefer 4000002 0 0 SEM 0 YES 0 0 0
t_except 4000003 0 0 SEM 0 YES 0 0 0
t_log 4000004 0 60 MSGQ 0 YES 0 0 0
t_power 4000005 0 254 RDY 0 YES 0 0 0
t_hotplug 4000006 0 250 RDY 0 YES 0 0 0
t_reclaim 4000008 0 253 MSGQ 0 YES 0 0 0
t_sync 4000009 0 252 RDY 0 0 0 0
t_dcwpipe 400000a 0 160 SEM 0 0 0 0
t_tpsfs 400000b 0 160 SLP 0 63 0 0
t_console 400000c 0 150 MSGQ 0 YES 0 0 0
t_netjob 400000d 0 110 SEM 0 YES 0 0 0
t_netproto 400000e 0 110 MSGQ 0 YES 74 0 0
t_snmp 400000f 0 110 MSGQ 0 YES 0 0 0
t_ftpd 4000010 0 160 MSGQ 0 0 0 0
t_telnetd 4000011 0 160 MSGQ 0 0 0 0
t_jobq 4000013 0 200 SEM 0 YES 0 0 0
t_xinput 4000015 0 200 SEM 0 0 0 0
t_xcondev 4000016 0 200 MSGQ 0 0 0 0
main.jsc 4000017 1 200 SEM 0 0 1 USE 0
t_tshell 4000018 0 150 RDY 1 0 0 0
t_tshell 400001a 0 150 SEM 0 0 0 0
jsre_timer 400001b 1 180 VUTX 0 868 0 0
imgpull.jsc 400001c 1 200 SEM 0 0 0 USE 0
assistant.jsc 400001d 1 200 SEM 0 0 0 USE 0
pthread_test1 400001f 3 240 RDY 0 0 1 USE 0
thread: 27
[root@sylixos:/apps/pthread_test]#