tomcat modify virtual machine parameters

first step:

catalinat.bat is used on windows, and catalina.sh is used on linux.

Step 2: Right click to open with notepad

 

 增加一行:set "JAVA_OPTS=-XX:+PrintGCDetails -Xmx512M -Xms512M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseSerialGC -XX:PermSize=32M -Xloggc:d:/gc.log"

Step 3: Start tomcat locally

 

 Step 4: Since I set the gc log path, when tomcat starts, the D drive will have log files:

The above is to modify the parameters of the tomcat virtual machine and how to print the gc log

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324715257&siteId=291194637