Advertisement
easternnl

Start Java program with all GC verbose parameters

May 19th, 2016
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.67 KB | None | 0 0
  1. for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
  2. set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
  3. set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
  4.  
  5. set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
  6. set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
  7. set "gclogstamp=%username%_%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%.gc"
  8. set "logstamp=%username%_%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%.log"
  9.  
  10. java -XX:+PrintGC -Xms16m -Xmx32m -Xloggc:%gclogstamp% -XshowSettings:all -XX:+PrintCommandLineFlags -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintFlagsFinal -jar yed.jar > %logstamp%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement