Get a list of all threads currently running in Java

后端 未结 13 1460
[愿得一人]
[愿得一人] 2020-11-22 02:30

Is there any way I can get a list of all running threads in the current JVM (including the threads not started by my class)?

Is it also possible to get the

相关标签:
13条回答
  • 2020-11-22 03:28

    Yes, take a look at getting a list of threads. Lots of examples on that page.

    That's to do it programmatically. If you just want a list on Linux at least you can just use this command:

    kill -3 processid
    

    and the VM will do a thread dump to stdout.

    0 讨论(0)
提交回复
热议问题