tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geet Chandra <gee...@gmail.com>
Subject Re: Info on PermSize and MaxPermSize
Date Fri, 16 Mar 2012 10:35:54 GMT
On Fri, Mar 16, 2012 at 1:24 PM, André Warnier <aw@ice-sa.com> wrote:

> Geet Chandra wrote:
> ...
>
> ...
>
>
>
>>>    Here is code snippet for registering as Windows service
>> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program
>> Files\<ProductName>\non<**Product>\tomcat\b\bin\tomcat6.**exe" --Jvm=auto
>> --StartMode=jvm --StopMode=jvm
>> --StartClass=org.apache.**catalina.startup.Bootstrap --StartParams=start
>> --StopClass=org.apache.**catalina.startup.Bootstrap --StopParams=stop
>> The above code snippet is run as *.bat and being invoked from *.msi
>>
>>  and
>>>> command to start tomcat as "cmd.exe /c net start tomcat ".
>>>>
>>> - As utility.vbs is being included in tomcat package(*.msi) , once tomcat
>>>  is installed on system, this utility.vbs is placed in
>>> "C:\Program Files\<ProductName>\non<**Product>\tomcat\b\bin\" folder.
>>>
>>
>>   Here is snippet for utility.vbs as
>>  - WSH_Shell.Run("cmd.exe /c net " & "stop"  &
>> &chr(34)&Servicename&chr(34),**0,True)
>>
>>  So my question is there way to configure mentioned parameters before
>> starting tomcat as Windows service.
>>
>>  Ok.
>
> There are different Windows packages for tomcat, different ways to install
> Tomcat under Windows, and different ways to run it.  And the answer to your
> original question is different in each case. Previously, it was not clear
> which way you were using.  Now it is.
>
> First, you should consult the Tomcat FAQ, in which there is a whole
> section about running under Windows.  More specifically this article :
> http://wiki.apache.org/tomcat/**FAQ/Windows#Q11<http://wiki.apache.org/tomcat/FAQ/Windows#Q11>
> In that page is a link to the "procrun" software documentation, which you
> should also read.
>
> This all explains what the above command
> > "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program .....
> is, what it does, and how to set the appropriate parameters in the Windows
> Registry to achieve what you want to do.
>
> Key points :
> - the "-XX" command-line switches are command-line switches for the Java
> JVM which runs tomcat
> - the Windows Service runs the program tomcat(version).exe, which is a
> wrapper
> - the wrapper runs the JVM which runs tomcat
> - the wrapper reads its parameters from the Windows Registry, including
> the command-line switches that it should pass to the JVM when it starts it
> - these Registry parameters are set by the above command
> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program ....
> when you use it to install the service
>
> If this is still not clear, come back here and ask away.
>

   Could you please tell me how to set

-XX:MaxPermSize=96m  and -XX:PermSize=72m in Window Registry, when I start
tomcat as window service, it should pass these value to JVM.

Can I execute the following command to register

"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions
"-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 256 --JvmMx 512 -XX:MaxPermSize
96m -XX:PermSize=72m


> One more note : the JVM command-line switches can vary between different
> JVM versions. That's why it is also important to know which JVM version you
> are using.
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<users-unsubscribe@tomcat.apache.org>
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks & Regards
Geet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message