Created
February 17, 2017 07:24
-
-
Save poornan/f9bf7f5cf1e553b8ec5f49a398a5e6dd to your computer and use it in GitHub Desktop.
Create Java thread dump on windows every 20 second
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM The following batch script generates 6 thread dumps at a preset interval of 20 secs | |
REM script can be executed as | |
REM threaddump-windows-jstack.bat 2120 | |
REM where 2120 is the java process id | |
for /L %%i in (1,1,6) do ( | |
echo Taking Thread Dump %i | |
jstack -l %1 > thread-dump-%%i.txt | |
timeout 20 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment