在Linux中查找为特定进程运行的线程

时间:2021-11-03 22:23:13

I want to know the threads running for a particular process in Linux? How can I manage this?

我想知道在Linux中为特定进程运行的线程?我该怎么办呢?

2 个解决方案

#1


15  

You can use

您可以使用

 ps -eLf

Check this link. http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

检查此链接。 http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

#2


2  

What do you want to know about the threads? Try:

你想知道关于线程的什么?尝试:

  • Attaching gdb and using "info threads"
  • 附加gdb并使用“info threads”
  • Looking in /proc/<pid>/task, where the threads are listed
  • 查看/ proc / / task,其中列出了线程

#1


15  

You can use

您可以使用

 ps -eLf

Check this link. http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

检查此链接。 http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

#2


2  

What do you want to know about the threads? Try:

你想知道关于线程的什么?尝试:

  • Attaching gdb and using "info threads"
  • 附加gdb并使用“info threads”
  • Looking in /proc/<pid>/task, where the threads are listed
  • 查看/ proc / / task,其中列出了线程