Hi,

I ran ./jsvc help and notice it had a -jvm option.  So I tried this:

CATALINA_HOME=/usr/share/apache-tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/apache-tomcat/temp
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER \
   -jvm server \ #<<<<<<<<<<<<This is the good part
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -outfile $CATALINA_HOME/logs/catalina.out \
   -errfile '&1' \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   #
   # To get a verbose JVM
   #-verbose     # To get a debug of jsvc.
   #-debug
   ;;

And jsvc seems to be cool with it.  Anyone know if there is a way to verify 
that the jvm is running in server mode?

Thanks,
- Ole



Ole Ersoy wrote:
Hi,

I'm trying to get the -server option working with jsvc. When inserting -server I get this:

[EMAIL PROTECTED] init.d]# service tomcat start
Starting tomcat
27/08/2007 21:11:08 10371 jsvc error: Invalid option -server
27/08/2007 21:11:08 10371 jsvc error: Cannot parse command line arguments

The script looks like this (Note that if I remove "-server" tomcat start fine):

CATALINA_HOME=/usr/share/apache-tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/apache-tomcat/temp
CATALINA_OPTS=-server
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
 start)
   #
   # Start Tomcat
   #
   echo -n "Starting tomcat"
   echo
   $DAEMON_LAUNCHER -server \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -outfile $CATALINA_HOME/logs/catalina.out \
   -errfile '&1' \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   #
   # To get a verbose JVM
   #-verbose     # To get a debug of jsvc.
   #-debug
   ;;

Any ideas?

Thanks,
- Ole




Karel Sedlacek wrote:
OK, let me give this a whirl.

Karel

At 09:20 AM 8/22/2007, you wrote:
See the table in this page. On Windows on i586 java always defaults to client runtime. (amd64 or ia-64 are different)
http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

If you can set JAVA_OPTS=-server java starts with it. Print System.getProperties() and you can see what runtime is used.

Ronald.

On Wed Aug 22 14:15:27 CEST 2007 Tomcat Users List <users@tomcat.apache.org> wrote:
I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
One JRE: 1.5.0_09
Karel
> as far as i know this option is outdated, hence the vm automatically
> goes into server mode if it detects a server class machine (>=2GB RAM,
> 2 processors (which also includes ht or dualcore)
>
> leon
>
> maybe wrong though
>
> On 8/22/07, Ben Souther <[EMAIL PROTECTED]> wrote:
>> It depends on which operating system you're using and how you've
>> installed Tomcat.
>> Can you tell us which it is?
>>
>>
>>
>> On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
>> > Thanks for this info,...
>> >
>> > How do I implement this tip?
>> >
>> > #18. Use the -server JVM option. This enables the server JVM, which
>> JIT
>> > compiles bytecode much earlier, and with stronger optimizations.
>> Startup
>> > and first calls will be slower due to JIT compilation taking more
>> time,
>> > but subsequent ones will be faster.
>> >
>> > Karel
>> >
>> > > In putting #1 into the JAVA_OPTS (which it appears that is the
>> > > CATALINA_OPTS
>> > > for our implementation), it doesn't appear to work, as Tomcat
>> doesn't
>> > > restart. It could be our version -- which is currently 5.0.30.
>> please
>> > > let
>> > > me know if there are other steps we need to take here as well.
>> > >
>> > > thanks,
>> > > Kim :-)
>> > >
>> > > On 8/21/07, Shane Witbeck <[EMAIL PROTECTED]> wrote:
>> > >>
>> > >> I thought my latest blog post would be of interest to the people on
>> this
>> > >> list:
>> > >>
>> > >>
>> > >> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>> > >>

Karel Sedlacek                                          [EMAIL PROTECTED]
CIT Data Administration                                 Phn 607-255-7742
Cornell University Fax 607-255-1297
Ithaca, NY 14853


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to