java start up arg samples

Unix env setup

jflags="-ms1536M -mx1536M -Xnoclassgc"


gcVerbose="-verbose:gc"


jconsole="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8003 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"


remoteDebug="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1861"


memoryLeak="-agentlib:hprof=heap=dump,file=/tmp/hf52065-hprof.bin,format=b,depth=10"
(the last one depends on JT Harness, please refer to http://blog.emptyway.com/2007/04/02/finding-memory-leaks-in-java-apps/)

 

Windows env setup

set JAVA_OPTS=%JAVA_OPTS% -Xloggc:%GCLOGLOCATION%%GCLOG% 

Explanation: to output gc info

你可能感兴趣的:(java,socket,unix,UP,sun)