javakillthread-dumpjstack

kill -3 or jstack : What is the difference?


I want to get the thread dump of my web app that running on a jboss server.

I found two solutions for my problem :

Can anyone explain to me the difference between theses two methods?

Thanks in advance !


Solution

  • The jstack command can get a thread dump of a program running on a remote machine, and it also works on Windows.

    kill -3 only works on local programs, and on Windows there is no kill.