tomcat简单优化
系统运维
我的优化配置:
JAVA_OPTS=-Xms16384m -Xmx16384m -Xloggc:/home/soft/8080_gc.log -Xss256k -Xmn6144m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:SurvivorRatio=6 -XX:MaxTenuringThreshold=7 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSFullGCsBeforeCompaction=0 -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:TargetSurvivorRatio=90 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC
Tomcat 优化分为系统优化,Java虚拟机调优,Tomcat本身的优化。
调整tomcat的占用内存
1.编辑catalina.sh文件
vim catalina.sh
2.查找到tomcat内存参数一行:/ JAVA_OPTS(如果找不到则在第一行写上)
3.将JAVA_OPTS=-Xms1024m –Xmx1520m一行的两个参数依据服务器实际内存数量分别进行更改:
- Xms为tomcat启动初始内存,一般为服务器开机后可用空闲内存减去100M
- Xmx为tomcat占用内存,一般为服务器开机后可用空闲内存减去50M
一般应该使用物理内存的 80% 作为堆大小。
以上两个参数关系到tomcat承受的访问性能,要根据服务器实际内存情况设定。
Xms和Xmx的值取成一样比较好,可以加快内存回收速度,会常GC
值的大小一般根据需要进行配置。初始化堆的大小执行了虚拟机在启动时向系统申请的内存的大小。一般而言,这个参数不重要。但是有的应用程式在大负载的情况下会急剧地占用更多的内存,此时这个参数就是显得很重要,假如虚拟机启动时配置使用的内存比较小而在这种情况下有许多对象进行初始化,虚拟机就必须重复地增加内存来满足使用。由于这种原因,我们一般把-Xms和-Xmx设为相同大,而堆的值受限于系统使用的物理内存。一般使用数据量较大的应用程式会使用持久对象,内存使用有可能迅速地增长。当应用程式需要的内存超出堆的值时虚拟机就会提示内存溢出,并且导致应用服务崩溃。因此一般建议堆的值配置为可用内存的值的80%。
Tomcat默认能够使用的内存为128MB,在实际生产中,这点内存通常是不足的,需要大些
在/bin/catalina.sh中,增加如下配置:
JAVA_OPTS=\'-Xms[初始化内存大小] -Xmx[能够使用的内存]\'
需要时,把这个两个参数值调大。例如:
JAVA_OPTS=\'-Xms256m -Xmx512m\'
表示初始化内存为256MB,能够使用的内存为512MB。
要考虑的是Java提供的垃圾回收机制。虚拟机的堆大小决定了虚拟机花费在收集垃圾上的时间和频度。收集垃圾能够接受的速度和应用有关,应该通过分析实际的垃圾收集的时间和频率来调整。假如堆的大小很大,那么完全垃圾收集就会很慢,但是频度会降低。假如您把堆的大小和内存的需要一致,完全收集就很快,但是会更加频繁。调整堆大小的的目的是最小化垃圾收集的时间,以在特定的时间内化处理客户的请求。在基准测试的时候,为确保最好的性能,要把堆的大小设大,确保垃圾收集不在整个基准测试的过程中出现。
假如系统花费很多的时间收集垃圾,请减小堆大小。一次完全的垃圾收集应该不超过 3-5 秒。假如垃圾收集成为瓶颈,那么需要指定代的大小,检查垃圾收集的周详输出,研究 垃圾收集参数对性能的影响。一般说来,您应该使用物理内存的 80% 作为堆大小。当增加处理器时,记得增加内存,因为分配能够并行进行,而垃圾收集不是并行的。
调整tomcat的线程参数
编辑server.xml文件
在tomcat配置文件server.xml中的
maxThreads=150,表示最多同时处理150个连接,Tomcat使用线程来处理接收的每个请求。这个值表示Tomcat可创建的的线程数。默认值200。
minSpareThreads=25,表示即使没有人使用也开这么多空线程等待
maxSpareThreads=75,表示如果最多可以空75个线程,例如某时刻有80人访问,之后没有人访问了,则tomcat不会保留80个空线程,而是关闭5个空的。 (一旦创建的线程超过这个值,Tomcat就会关闭不再需要的socket线程。默认值50)
acceptCount=100,当同时连接的人数达到maxThreads时,还可以接收排队的连接数量,超过这个连接的则直接返回拒绝连接。(指定当任何能够使用的处理请求的线程数都被使用时,能够放到处理队列中的请求数,超过这个数的请求将不予处理。默认值100)
其中和连接数相关的参数为maxThreads和acceptCount。如果要加大并发连接数,应同时加大这两个参数。
web server允许的连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。tomcat5中的配置示例:
acceptCount=100/>
主要是调整maxThreads 和acceptCount的值
在tomcat配置文档server.xml中的配置中,和连接数相关的其他参数有:
enableLookups是否反查域名,默认值为true。为了提高处理能力,应配置为false
connnectionTimeout网络连接超时,默认值60000,单位:毫秒。配置为0表示永不超时,这样配置有隐患的。通常可配置为30000毫秒。
maxKeepAliveRequestsnginx动态的转给tomcat,nginx是不能keepalive的,而tomcat端默认开启了keepalive,会等待keepalive的timeout,默认不设置就是使用connectionTimeout。
所以必须设置tomcat的超时时间,并关闭tomcat的keepalive。否则会产生大量tomcat的socket timewait。
maxKeepAliveRequests=1就可以避免tomcat产生大量的TIME_WAIT连接,从而从一定程度上避免tomcat假死。
设置tomcat/conf/server.xml:
maxKeepAliveRequests=1
connectionTimeout=20000
maxKeepAliveRequests=1 ##表示每个连接只响应一次就关闭,这样就不会等待timeout了
connectionTimeout=30000 maxKeepAliveRequests=1
redirectPort=8443 bufferSize=8192 sockedBuffer=65536 acceptCount=200/>
bufferSize输入流缓冲大小,默认值2048 bytes。
compression压缩传输,取值on/off/force,默认值off
贴上我的配置文件:
CATALINA_OPTS=-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.port=12345-Djava.rmi.server.hostname=10.1.2.131 JAVA_OPTS=-Xms16384m-Xmx16384m-Xloggc:/home/soft/8080_gc.log-Xss256k-Xmn6144m-XX:PermSize=1024m-XX:MaxPermSize=1024m-XX:SurvivorRatio=6-XX:MaxTenuringThreshold=7-XX:+UseConcMarkSweepGC-XX:+UseParNewGC-XX:CMSFullGCsBeforeCompaction=0-XX:+UseCMSCompactAtFullCollection-XX:CMSInitiatingOccupancyFraction=60-XX:+CMSClassUnloadingEnabled-XX:SoftRefLRUPolicyMSPerMB=0-XX:TargetSurvivorRatio=90-XX:+PrintGCDetails-XX:+PrintGCTimeStamps-XX:+PrintHeapAtGC #JAVA_OPTS=-Xms4096m-Xmx16384m-XX:MaxPermSize=1024m #OSspecificsupport.$var_must_besettoeithertrueorfalse. cygwin=false darwin=false os400=false case`uname`in CYGWIN*)cygwin=true;; Darwin*)darwin=true;; OS400*)os400=true;; esac #resolvelinks-$0maybeasoftlink PRG=$0 while[-h$PRG];do ls=`ls-ld$PRG` link=`expr$ls:\'.*->\\(.*\\)$\'` ifexpr$link:\'/.*\'>/dev/null;then PRG=$link else PRG=`dirname$PRG`/$link fi done #Getstandardenvironmentvariables PRGDIR=`dirname$PRG` #OnlysetCATALINA_HOMEifnotalreadyset [-z$CATALINA_HOME]&&CATALINA_HOME=`cd$PRGDIR/..>/dev/null;pwd` #CopyCATALINA_BASEfromCATALINA_HOMEifnotalreadyset [-z$CATALINA_BASE]&&CATALINA_BASE=$CATALINA_HOME #EnsurethatneitherCATALINA_HOMEnorCATALINA_BASEcontainsacolon #asthisisusedastheseparatorintheclasspathandJavaprovidesno #mechanismforescapingifthesamecharacterappearsinthepath. case$CATALINA_HOMEin *:*)echoUsingCATALINA_HOME:$CATALINA_HOME; echoUnabletostartasCATALINA_HOMEcontainsacolon(:)character; exit1; esac case$CATALINA_BASEin *:*)echoUsingCATALINA_BASE:$CATALINA_BASE; echoUnabletostartasCATALINA_BASEcontainsacolon(:)character; exit1; esac #EnsurethatanyuserdefinedCLASSPATHvariablesarenotusedonstartup, #butallowthemtobespecifiedinsetenv.sh,inrarecasewhenitisneeded. CLASSPATH= if[-r$CATALINA_BASE/bin/setenv.sh];then .$CATALINA_BASE/bin/setenv.sh elif[-r$CATALINA_HOME/bin/setenv.sh];then .$CATALINA_HOME/bin/setenv.sh fi #ForCygwin,ensurepathsareinUNIXformatbeforeanythingistouched if$cygwin;then [-n$JAVA_HOME]&&JAVA_HOME=`cygpath--unix$JAVA_HOME` [-n$JRE_HOME]&&JRE_HOME=`cygpath--unix$JRE_HOME` [-n$CATALINA_HOME]&&CATALINA_HOME=`cygpath--unix$CATALINA_HOME` [-n$CATALINA_BASE]&&CATALINA_BASE=`cygpath--unix$CATALINA_BASE` [-n$CLASSPATH]&&CLASSPATH=`cygpath--path--unix$CLASSPATH` fi #ForOS400 if$os400;then #Setjobprioritytostandardforinteractive(interactive-6)byusing #theinteractivepriority-6,thehelperthreadsthatrespondtorequests #willberunningatthesamepriorityasinteractivejobs. COMMAND=\'chgjobjob(\'$JOBNAME\')runpty(6)\' system$COMMAND #Enablemultithreading exportQIBM_MULTI_THREADED=Y fi #GetstandardJavaenvironmentvariables if$os400;then #-rwillOnlyworkontheos400ifthefilesare: #1.ownedbytheuser #2.ownedbythePRIMARYgroupoftheuser #thiswillnotworkiftheuserbelongsinsecondarygroups .$CATALINA_HOME/bin/setclasspath.sh else if[-r$CATALINA_HOME/bin/setclasspath.sh];then .$CATALINA_HOME/bin/setclasspath.sh else echoCannotfind$CATALINA_HOME/bin/setclasspath.sh echoThisfileisneededtorunthisprogram exit1 fi fi #AddonextrajarfilestoCLASSPATH if[!-z$CLASSPATH];then CLASSPATH=$CLASSPATH: fi CLASSPATH=$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar if[-z$CATALINA_OUT];then CATALINA_OUT=$CATALINA_BASE/logs/catalina.out fi if[-z$CATALINA_TMPDIR];then #Definethejava.io.tmpdirtouseforCatalina CATALINA_TMPDIR=$CATALINA_BASE/temp fi #Addtomcat-juli.jartoclasspath #tomcat-juli.jarcanbeover-riddenperinstance if[-r$CATALINA_BASE/bin/tomcat-juli.jar];then CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar else CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar fi #Bugzilla37848:WhennoTTYisavailable,don\'toutputtoconsole have_tty=0 if[`tty`!=notatty];then have_tty=1 fi #ForCygwin,switchpathstoWindowsformatbeforerunningjava if$cygwin;then JAVA_HOME=`cygpath--absolute--windows$JAVA_HOME` JRE_HOME=`cygpath--absolute--windows$JRE_HOME` CATALINA_HOME=`cygpath--absolute--windows$CATALINA_HOME` CATALINA_BASE=`cygpath--absolute--windows$CATALINA_BASE` CATALINA_TMPDIR=`cygpath--absolute--windows$CATALINA_TMPDIR` CLASSPATH=`cygpath--path--windows$CLASSPATH` JAVA_ENDORSED_DIRS=`cygpath--path--windows$JAVA_ENDORSED_DIRS` fi #SetjuliLogManagerconfigfileifitispresentandanoverridehasnotbeenissued if[-z$LOGGING_CONFIG];then if[-r$CATALINA_BASE/conf/logging.properties];then LOGGING_CONFIG=-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties else #Bugzilla45585 LOGGING_CONFIG=-Dnop fi fi if[-z$LOGGING_MANAGER];then LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager fi #Uncommentthefollowinglinetomaketheumaskavailablewhenusingthe #org.apache.catalina.security.SecurityListener #JAVA_OPTS=$JAVA_OPTS-Dorg.apache.catalina.security.SecurityListener.UMASK=`umask` #-----ExecuteTheRequestedCommand----------------------------------------- #Bugzilla37848:onlyoutputthisifwehaveaTTY if[$have_tty-eq1];then echoUsingCATALINA_BASE:$CATALINA_BASE echoUsingCATALINA_HOME:$CATALINA_HOME echoUsingCATALINA_TMPDIR:$CATALINA_TMPDIR if[$1=debug];then echoUsingJAVA_HOME:$JAVA_HOME else echoUsingJRE_HOME:$JRE_HOME fi echoUsingCLASSPATH:$CLASSPATH if[!-z$CATALINA_PID];then echoUsingCATALINA_PID:$CATALINA_PID fi fi if[$1=jpda];then if[-z$JPDA_TRANSPORT];then JPDA_TRANSPORT=dt_socket fi if[-z$JPDA_ADDRESS];then JPDA_ADDRESS=localhost:8000 fi if[-z$JPDA_SUSPEND];then JPDA_SUSPEND=n fi if[-z$JPDA_OPTS];then JPDA_OPTS=-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND fi CATALINA_OPTS=$JPDA_OPTS$CATALINA_OPTS shift fi if[$1=debug];then if$os400;then echoDebugcommandnotavailableonOS400 exit1 else shift if[$1=-security];then if[$have_tty-eq1];then echoUsingSecurityManager fi shift exec$_RUNJDB$LOGGING_CONFIG$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS-classpath$CLASSPATH\\ -sourcepath$CATALINA_HOME/../../java\\ -Djava.security.manager\\ -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy\\ -Dcatalina.base=$CATALINA_BASE\\ -Dcatalina.home=$CATALINA_HOME\\ -Djava.io.tmpdir=$CATALINA_TMPDIR\\ org.apache.catalina.startup.Bootstrap$@start else exec$_RUNJDB$LOGGING_CONFIG$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS-classpath$CLASSPATH\\ -sourcepath$CATALINA_HOME/../../java\\ -Dcatalina.base=$CATALINA_BASE\\ -Dcatalina.home=$CATALINA_HOME\\ -Djava.io.tmpdir=$CATALINA_TMPDIR\\ org.apache.catalina.startup.Bootstrap$@start fi fi elif[$1=run];then shift if[$1=-security];then if[$have_tty-eq1];then echoUsingSecurityManager fi shift evalexec\\$_RUNJAVA\\\\$LOGGING_CONFIG\\$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Djava.security.manager\\ -Djava.security.policy==\\$CATALINA_BASE/conf/catalina.policy\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrap$@start else evalexec\\$_RUNJAVA\\\\$LOGGING_CONFIG\\$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrap$@start fi elif[$1=start];then if[!-z$CATALINA_PID];then if[-f$CATALINA_PID];then if[-s$CATALINA_PID];then echoExistingPIDfilefoundduringstart. if[-r$CATALINA_PID];then PID=`cat$CATALINA_PID` ps-p$PID>/dev/null2>&1 if[$?-eq0];then echoTomcatappearstostillberunningwithPID$PID.Startaborted. echoIfthefollowingprocessisnotaTomcatprocess,removethePIDfileandtryagain: ps-f-p$PID exit1 else echoRemoving/clearingstalePIDfile. rm-f$CATALINA_PID>/dev/null2>&1 if[$?!=0];then if[-w$CATALINA_PID];then cat/dev/null>$CATALINA_PID else echoUnabletoremoveorclearstalePIDfile.Startaborted. exit1 fi fi fi else echoUnabletoreadPIDfile.Startaborted. exit1 fi else rm-f$CATALINA_PID>/dev/null2>&1 if[$?!=0];then if[!-w$CATALINA_PID];then echoUnabletoremoveorwritetoemptyPIDfile.Startaborted. exit1 fi fi fi fi fi shift touch$CATALINA_OUT if[$1=-security];then if[$have_tty-eq1];then echoUsingSecurityManager fi shift eval\\$_RUNJAVA\\\\$LOGGING_CONFIG\\$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Djava.security.manager\\ -Djava.security.policy==\\$CATALINA_BASE/conf/catalina.policy\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrap$@start\\ >>$CATALINA_OUT2>&1& else eval\\$_RUNJAVA\\\\$LOGGING_CONFIG\\$LOGGING_MANAGER$JAVA_OPTS$CATALINA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrap$@start\\ >>$CATALINA_OUT2>&1& fi if[!-z$CATALINA_PID];then echo$!>$CATALINA_PID fi echoTomcatstarted. elif[$1=stop];then shift SLEEP=5 if[!-z$1];then echo$1|grep[^0-9]>/dev/null2>&1 if[$?-gt0];then SLEEP=$1 shift fi fi FORCE=0 if[$1=-force];then shift FORCE=1 fi if[!-z$CATALINA_PID];then if[-f$CATALINA_PID];then if[-s$CATALINA_PID];then kill-0`cat$CATALINA_PID`>/dev/null2>&1 if[$?-gt0];then echoPIDfilefoundbutnomatchingprocesswasfound.Stopaborted. exit1 fi else echoPIDfileisemptyandhasbeenignored. fi else echo\\$CATALINA_PIDwassetbutthespecifiedfiledoesnotexist.IsTomcatrunning?Stopaborted. exit1 fi fi eval\\$_RUNJAVA\\$LOGGING_MANAGER$JAVA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrap$@stop #stopfailed.Shutdownportdisabled?Tryanormalkill. if[$?!=0];then if[!-z$CATALINA_PID];then echoThestopcommandfailed.AttemptingtosignaltheprocesstostopthroughOSsignal. kill-15`cat$CATALINA_PID`>/dev/null2>&1 fi fi if[!-z$CATALINA_PID];then if[-f$CATALINA_PID];then while[$SLEEP-ge0];do kill-0`cat$CATALINA_PID`>/dev/null2>&1 if[$?-gt0];then rm-f$CATALINA_PID>/dev/null2>&1 if[$?!=0];then if[-w$CATALINA_PID];then cat/dev/null>$CATALINA_PID #IfTomcathasstoppeddon\'ttryandforceastopwithanemptyPIDfile FORCE=0 else echoThePIDfilecouldnotberemovedorcleared. fi fi echoTomcatstopped. break fi if[$SLEEP-gt0];then sleep1 fi if[$SLEEP-eq0];then echoTomcatdidnotstopintime. if[$FORCE-eq0];then echoPIDfilewasnotremoved. fi echoToaiddiagnosticsathreaddumphasbeenwrittentostandardout. kill-3`cat$CATALINA_PID` fi SLEEP=`expr$SLEEP-1` done fi fi KILL_SLEEP_INTERVAL=5 if[$FORCE-eq1];then if[-z$CATALINA_PID];then echoKillfailed:\\$CATALINA_PIDnotset else if[-f$CATALINA_PID];then PID=`cat$CATALINA_PID` echoKillingTomcatwiththePID:$PID kill-9$PID while[$KILL_SLEEP_INTERVAL-ge0];do kill-0`cat$CATALINA_PID`>/dev/null2>&1 if[$?-gt0];then rm-f$CATALINA_PID>/dev/null2>&1 if[$?!=0];then if[-w$CATALINA_PID];then cat/dev/null>$CATALINA_PID else echoThePIDfilecouldnotberemoved. fi fi echoTheTomcatprocesshasbeenkilled. break fi if[$KILL_SLEEP_INTERVAL-gt0];then sleep1 fi KILL_SLEEP_INTERVAL=`expr$KILL_SLEEP_INTERVAL-1` done if[$KILL_SLEEP_INTERVAL-lt0];then echoTomcathasnotbeenkilledcompletelyyet.TheprocessmightbewaitingonsomesystemcallormightbeUNINTERRUPTIBLE. fi fi fi fi elif[$1=configtest];then eval\\$_RUNJAVA\\$LOGGING_MANAGER$JAVA_OPTS\\ -Djava.endorsed.dirs=\\$JAVA_ENDORSED_DIRS\\-classpath\\$CLASSPATH\\\\ -Dcatalina.base=\\$CATALINA_BASE\\\\ -Dcatalina.home=\\$CATALINA_HOME\\\\ -Djava.io.tmpdir=\\$CATALINA_TMPDIR\\\\ org.apache.catalina.startup.Bootstrapconfigtest result=$? if[$result-ne0];then echoConfigurationerrordetected! fi exit$result elif[$1=version];then $_RUNJAVA\\ -classpath$CATALINA_HOME/lib/catalina.jar\\ org.apache.catalina.util.ServerInfo else echoUsage:catalina.sh(commands...) echocommands: if$os400;then echodebugStartCatalinainadebugger(notavailableonOS400) echodebug-securityDebugCatalinawithasecuritymanager(notavailableonOS400) else echodebugStartCatalinainadebugger echodebug-securityDebugCatalinawithasecuritymanager fi echojpdastartStartCatalinaunderJPDAdebugger echorunStartCatalinainthecurrentwindow echorun-securityStartinthecurrentwindowwithsecuritymanager echostartStartCatalinainaseparatewindow echostart-securityStartinaseparatewindowwithsecuritymanager echostopStopCatalina,waitingupto5secondsfortheprocesstoend echostopnStopCatalina,waitinguptonsecondsfortheprocesstoend echostop-forceStopCatalina,waitupto5secondsandthenusekill-KILLifstillrunning echostopn-forceStopCatalina,waituptonsecondsandthenusekill-KILLifstillrunning echoconfigtestRunabasicsyntaxcheckonserver.xml-checkexitcodeforresult echoversionWhatversionoftomcatareyourunning? echoNote:Waitingfortheprocesstoendanduseofthe-forceoptionrequirethat\\$CATALINA_PIDisdefined exit1 fi
文章标题:tomcat简单优化
转载注明:http://hbruida.cn/article/cpodcd.html