Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 805119E62 for ; Fri, 16 Mar 2012 10:36:24 +0000 (UTC) Received: (qmail 456 invoked by uid 500); 16 Mar 2012 10:36:21 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 361 invoked by uid 500); 16 Mar 2012 10:36:21 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 350 invoked by uid 99); 16 Mar 2012 10:36:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 10:36:21 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of geetcs@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bk0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 10:36:14 +0000 Received: by bkcjg9 with SMTP id jg9so3751897bkc.18 for ; Fri, 16 Mar 2012 03:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=P+LoE3hIyZHmicEuVWdI6GSXgt5mb10cgRbvSzd2E/o=; b=kEP5oinGQ2apprE1cv13bOs28u4lFThXA4aF9WFy9esDNb4DiNCfA6gHw2j2kUyme5 9xr8l/Fy1Bx9U1cwfLiNG5au7Ss0wqndIXhOzWAh//tT13a+ibzyE9CNMivLgKY04HvO 4rbJ4FJZoj+1XUnIeUlMhvsRQirnHPj6AwRx+NiUCSYdAQ0UUwnoKT6BksDPRFK40o7y lXy/qTEMzlWtfqIJ0OjZ3SOQR/1l9Iwv74YizF1z5/LcgUi5LWZ24m1molF7HyvMlQpj UvhCREsSc+geBti4qH0wIJjH/k8KWL5M4WtsPfeHQ8ibf/p+poUCSU3vExKT8WL+wHuD s8jw== MIME-Version: 1.0 Received: by 10.204.129.8 with SMTP id m8mr739778bks.69.1331894154234; Fri, 16 Mar 2012 03:35:54 -0700 (PDT) Received: by 10.205.47.195 with HTTP; Fri, 16 Mar 2012 03:35:54 -0700 (PDT) In-Reply-To: <4F62F1A4.2010208@ice-sa.com> References: <4F41EE6E.5050009@ordix.de> <4F60634C.5080402@ice-sa.com> <4F609D42.1000206@pidster.com> <4F61E216.9030001@ice-sa.com> <4F62F1A4.2010208@ice-sa.com> Date: Fri, 16 Mar 2012 16:05:54 +0530 Message-ID: Subject: Re: Info on PermSize and MaxPermSize From: Geet Chandra To: Tomcat Users List Content-Type: multipart/alternative; boundary=0015173fe4def10d7d04bb59c531 X-Virus-Checked: Checked by ClamAV on apache.org --0015173fe4def10d7d04bb59c531 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2012 at 1:24 PM, Andr=E9 Warnier wrote: > Geet Chandra wrote: > ... > > ... > > > >>> Here is code snippet for registering as Windows service >> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install=3D"C:\Program >> Files\\non<**Product>\tomcat\b\bin\tomcat6.**exe" --Jvm=3Da= uto >> --StartMode=3Djvm --StopMode=3Djvm >> --StartClass=3Dorg.apache.**catalina.startup.Bootstrap --StartParams=3Ds= tart >> --StopClass=3Dorg.apache.**catalina.startup.Bootstrap --StopParams=3Dsto= p >> 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 tomc= at >>> is installed on system, this utility.vbs is placed in >>> "C:\Program Files\\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 instal= l > Tomcat under Windows, and different ways to run it. And the answer to yo= ur > 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 > 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=3D"C:\Program ..... > is, what it does, and how to set the appropriate parameters in the Window= s > 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 i= t > - these Registry parameters are set by the above command > "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install=3D"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=3D96m and -XX:PermSize=3D72m in Window Registry, when I st= art 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=3D%CATALINA_BASE%\temp" --JvmMs 256 --JvmMx 512 -XX:MaxPe= rmSize 96m -XX:PermSize=3D72m > 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 y= ou > are using. > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --=20 Thanks & Regards Geet --0015173fe4def10d7d04bb59c531--