690 shaares
3 liens privés
3 liens privés
2 résultats
taggé
jstack
PID=12345
for ((a=1; a <= 60; a++)); do jstack $PID > thread-dump.$PID.$a; sleep 5; echo $PID.$a; done
Dump d'un processus java par la ligne de commande :
@echo off
set JAVA_HOME=C:\Temp\jdk1.7.0_51\
set DUMP_DIR=c:\Temp
REM Preparing Timestamp Information
set year=%date:~6,4%
set month=%date:~3,2%
set day=%date:~0,2%
set hour=%time:~0,2%
REM Replace leading space with zero
if “%hour:~0,1%” ==” ” set hour=0%hour:~1,1%
set minute=%time:~3,2%
set seconds=%time:~6,2%
set timestamp=%year%%month%%day%%hour%%minute%%seconds%
for /f "tokens=2" %%a in ('
tasklist ^| findstr java
') do if not "%%a"=="0" %JAVA_HOME%\bin\jstack.exe %%a > "%DUMP_DIR%\threaddump-%%a-%timestamp%.txt"