core/carbide_releases/run.jstack.bat
changeset 439 a29cb5e793d3
child 696 3edbbd22908c
child 697 78f4678e3281
equal deleted inserted replaced
438:1137da10d4e5 439:a29cb5e793d3
       
     1 echo off
       
     2 
       
     3 rem This is a utility batch file to get stack information from the Carbide.c++.2.2.exe process.
       
     4 rem In order to run it successfully, you will need to have a full JDK installed of version 1.6 or higher.
       
     5 rem See http://java.sun.com/javase/downloads/index.jsp for download information.
       
     6 rem If the Carbide process is found (and only one should be running) then stack information will be found in %OUTFILE%.
       
     7 
       
     8 
       
     9 echo Executing jstack on Carbide.c++.exe...
       
    10 
       
    11 set  JSTACK=c:\APPS\Java\jdk1.6.0_14\bin\jstack.exe
       
    12 set  OUTFILE=.\stack.txt
       
    13 
       
    14 if not exist %JSTACK% echo ERROR: jstack.exe cannot be found in %JSTACK%. jstack is provided under JDK 1.6 and higher, but is not distributed with Carbide. Please find the location of jstack and update the JSTACK variable in this batch file.  
       
    15 
       
    16 if not exist %JSTACK% GOTO END
       
    17 
       
    18 
       
    19 del %OUTFILE%
       
    20 
       
    21 rem echo Carbide.c++.2.2.exe >  %outfile%
       
    22 
       
    23 echo
       
    24 echo Searching for Carbide.c++ process...
       
    25 
       
    26 FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq  Carbide.c++.2.2.exe"
       
    27 /NH') DO @%JSTACK% %%i >  %OUTFILE%
       
    28 
       
    29 
       
    30 echo
       
    31 if exist %OUTFILE% echo Check for results in %OUTFILE%
       
    32 if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.2.2.exe running?
       
    33 
       
    34 :END
       
    35 
       
    36 pause
       
    37