在Linux中使用命令行进行单个线程优先级检查 [英] Individual thread priority checking using command line in linux
本文介绍了在Linux中使用命令行进行单个线程优先级检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以通过转到/proc/$(pidof task)/并给出
I can see number of threads used in application by going to /proc/$(pidof task)/ and giving
猫的状态.
cat status.
有什么方法可以使用命令检查linux中各个线程的优先级吗?
Is there any way to check individual thread priority in linux using commands?
关于,
学习者
Regards,
Learner
推荐答案
使用-m -l
运行ps.它将列出有关特定PID的所有线程和优先级
Run ps with-m -l
. It will list all the thread and priority with respect to particular PID
ps -m -l [PID]
示例:
PC@PCuser:~$ ps -m -l 10070
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 - 1000 10070 1 0 - - - 31325 - ? 0:42 gedit
0 S 1000 - - 0 80 0 - - poll_s - 0:41 -
1 S 1000 - - 0 80 0 - - poll_s - 0:00 -
1 S 1000 - - 0 80 0 - - poll_s - 0:00 -
PC@PCuser:~$ ps -T -l [PID]
F S UID PID SPID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 S 1000 10070 10070 1 0 80 0 - 31325 poll_s ? 0:42 gedit
1 S 1000 10070 10073 1 0 80 0 - 31325 poll_s ? 0:00 gedit
1 S 1000 10070 10074 1 0 80 0 - 31325 poll_s ? 0:00 gedit
这篇关于在Linux中使用命令行进行单个线程优先级检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文