Hi All
Here we are suggesting some of the Linux commands that shall be useful to get information about threads running in process. If you have some more commands then you can suggest them in comment section.
Let's say we have process name "exeThread" that has thread implementation following command shall be helpful.
TechSujhav@ TS:~/thread$ ps -ef |grep exeThread [To find process-Id]
TechSujhav 22545 21921 99 16:52 pts/13 00:00:09 ./exeThread
TechSujhav 22568 44966 0 16:52 pts/26 00:00:00 grep --color=auto exeThread
TechSujhav@ TS:~/thread$ top -H -p 22545
top - 16:52:59 up 66 days, 7:53, 28 users, load average: 1.34, 0.51, 0.22
Threads: 3 total, 2 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.1 us, 0.0 sy, 0.0 ni, 96.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 19772300+total, 3364552 free, 1100208 used, 19325824+buff/cache
KiB Swap: 8388604 total, 8380144 free, 8460 used. 19517392+avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22546 TechSujhav 20 0 106304 1992 1840 R 99.9 0.0 0:28.24 exeThread
22548 TechSujhav 20 0 106304 1992 1840 R 99.7 0.0 0:28.24 exeThread
22545 TechSujhav 20 0 106304 1992 1840 S 0.0 0.0 0:00.00 exeThread
TechSujhav@ TS:~/thread$ ps -T -p 22545
PID SPID TTY TIME CMD
22545 22545 pts/13 00:00:00 exeThread
22545 22546 pts/13 00:01:33 exeThread
22545 22548 pts/13 00:01:33 exeThread
PREV:: How to debug threads with GDB debugger
Your Comments /Suggestions & Questions are always welcome.
We would like to help you with best of our knowledge.
So feel free to put Questions
No comments:
Post a Comment