Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 67514 invoked from network); 29 Mar 2007 02:10:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 02:10:59 -0000 Received: (qmail 62395 invoked by uid 500); 29 Mar 2007 02:11:06 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 62359 invoked by uid 500); 29 Mar 2007 02:11:06 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 62348 invoked by uid 99); 29 Mar 2007 02:11:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 19:11:06 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of akarasulu@gmail.com designates 66.249.82.235 as permitted sender) Received: from [66.249.82.235] (HELO wx-out-0506.google.com) (66.249.82.235) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 19:10:57 -0700 Received: by wx-out-0506.google.com with SMTP id h31so42448wxd for ; Wed, 28 Mar 2007 19:10:37 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=iAm4GpbjTQYvBNv6FHBAWbMliuWqG9v/3zoB48ZOpTDMgw5sSx8jqlIDq8QkveYPQrdmCwopxfzGO/kNdO+V10XiKEcVzZiPGA86rLktdWygGKl1SYAGdy62QZlLXoNs7SlwAK7qyuNrK2zt6UI7hi24mQoL9KARioRAt7PPATQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=rAIVr5vk8gfI6Kkxev5GWPcgslFr5kCMrU/q6Z2F0Xr+0SUG32VP7pJDi545V3M/uK7w6JxTnncPHS+1ocZFm3OR9J33ak0t8+2RUfwJ0f2J3GRTZdtP19mo7eWOJYhH4ACP8bHnFW5wXnV4fzvZ7P7HzcHAEmYR9qPLETsEXjY= Received: by 10.70.39.2 with SMTP id m2mr290573wxm.1175134236929; Wed, 28 Mar 2007 19:10:36 -0700 (PDT) Received: by 10.70.78.18 with HTTP; Wed, 28 Mar 2007 19:10:36 -0700 (PDT) Message-ID: Date: Wed, 28 Mar 2007 22:10:36 -0400 From: "Alex Karasulu" Sender: akarasulu@gmail.com To: "Apache Directory Developers List" Subject: Re: [RPM Installer] Generic start/stop shell script In-Reply-To: <4609E8BE.3070004@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18580_3891642.1175134236869" References: <4601D52D.1080003@gmail.com> <4609E8BE.3070004@gmail.com> X-Google-Sender-Auth: aa51dd8b78f1b953 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_18580_3891642.1175134236869 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Post startup? Hmmm I don't think so since these parameters are needed to initialize the different memory pools for various memory models. However I could be wrong. Regards, Alex On 3/28/07, Ole Ersoy wrote: > > Yeah - Would be nice if the server.xml file could contain default > alternatives. > > Anyone know if we can inject min/max heap size parameters into the JVM > post startup? > > Thanks, > - Ole > > > Alex Karasulu wrote: > > We might want to look at making some things like the min max heap > > sizes variable with defaults. However this we can do > > later after getting everything working. > > > > Alex > > > > > > On 3/21/07, *Ole Ersoy* > > wrote: > > > > I've tried to reduce our start/stop shell script to a minimum needed > > for RPM (I think Solaris, Mac, *NIX in general). > > > > I still need to test it out of coarse, but I thought I'd throw it > out > > here in case anyone has a chance to kick it. > > > > Just substitute apacheds for ${name} (It's a pseudo template - The > > final > > one will be a jet template....) > > > > > > #!/bin/bash > > # > > # chkconfig: - 91 35 > > # description: Starts and stops ${name} server. > > # > > # Shell script to start/stop ${name} > > # If you want to change ${name} service settings please modify the > > server.xml > > # file. > > # > > > > > > # Source function library. > > if [ -f /etc/init.d/functions ] ; then > > . /etc/init.d/functions > > fi > > > > # Source networking configuration. > > if [ -f /etc/sysconfig/network ] ; then > > . /etc/sysconfig/network > > fi > > > > # Check that networking is up. > > if [ ! -z "$NETWORKING" ] ; then > > if [ "$NETWORKING" = "no" ] ; then > > exit 0 > > fi > > fi > > > > prog=$"${name} server" > > StringUtils.toUpperCase(${name})_HOME=/usr/share/${name}-${version} > > #So for ApacheDS this would be > > # APACHEDS_HOME = /usr/share/apacheds-1.0.1 > > > > if [ -z "$JAVA_HOME" ] ; then > > echo "Error: JAVA_HOME environment variable is not set." > > echo "You will need to set the JAVA_HOME environment variable to" > > echo "the the path of the root java installation directory." > > echo "See the installation guide for further instructions." > > else > > echo JAVA_HOME=$JAVA_HOME > > fi > > > > > > DAEMON_HOME=$APACHEDS_HOME/bin > > CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar > > > > #The statement below will probably be shortened to > > #$DAEMON_HOME/bootstrapper.jar > > #when we figure out how to use the daemon and logger from > > /usr/share/java instead. > > > > > CLASSPATH=$CLASSPATH:$DAEMON_HOME/bootstrapper.jar:$DAEMON_HOME/logger.jar:$DAEMON_HOME/daemon.jar > > > > echo CLASSPATH=$CLASSPATH > > StringUtils.toUpperCase(${name})_USER=$USER > > > > TMP_DIR=/var/tmp/${name}-${version} > > PID_FILE=/var/run/${name}-${version}/server.pid > > > > cd $StringUtils.toUpperCase(${name})_HOME > > > > case "$1" in > > start) > > # > > # Start apacheds > > # > > echo -n $"Starting $prog: " > > ulimit -S -c 0 >/dev/null 2>&1 > > RETVAL=0 > > > > $DAEMON_HOME/apacheds \ > > -user $StringUtils.toUpperCase(${name})_USER \ > > -home $JAVA_HOME \ > > -Djava.io.tmpdir=$TMP_DIR \ > > > > - > Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\ > > -Xms384m -Xmx384m \ > > -pidfile $PID_FILE \ > > -outfile /var/log/${name}-${version}/${name}- stdout.log \ > > -errfile /var/log/${name}-${version}/${name}-stderr.log \ > > -cp $CLASSPATH \ > > org.apache.directory.daemon.JsvcBootstrapper \ > > $StringUtils.toUpperCase(${name})_HOME start > > > > [ "$RETVAL" -eq 0 ] && success $"apacheds server startup" || \ > > failure $"${name} server start" > > echo > > if [ -d /var/lock/subsys ] ; then > > [ "$RETVAL" -eq 0 ] && touch > > /var/${name}-${version}/apacheds.lock > > fi > > > > exit $RETVAL > > ;; > > > > stop) > > # > > # Stop ${name} > > # > > echo -n $"Shutting down $prog: " > > RETVAL=0 > > > > $DAEMON_HOME/${name} \ > > -stop \ > > -pidfile $PID_FILE \ > > > > - > > > Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\ > > org.apache.directory.daemon.JsvcBootstrapper stop > > > > [ "$RETVAL" -eq 0 ] && success $"apacheds server shutdown" || \ > > failure $"apacheds server shutdown" > > echo > > if [ -d /var/lock/subsys/apacheds ] ; then > > [ "$RETVAL" -eq 0 ] && rm > $APACHEDS_HOME/var/apacheds.lock > > fi > > > > exit $RETVAL > > ;; > > > > debug) > > # > > # Debug ${name} > > # > > echo -n $"Starting $prog in debug mode: " > > ulimit -S -c 0 >/dev/null 2>&1 > > RETVAL=0 > > > > if [ -z "$2" ] ; then > > echo > > echo ======================================================== > > echo "Warning: the debug port is not set. Using 5005 default." > > echo ======================================================== > > echo > > DEBUG_PORT=5005 > > else > > DEBUG_PORT="$2" > > fi > > > > $JAVA_HOME/bin/java\ > > > > -Dlog4j.configuration=file://$StringUtils.toUpperCase > (${name})_HOME/conf/log4j.properties\ > > -Xms384m -Xmx384m \ > > -Dcom.sun.management.jmxremote \ > > -Xdebug -Xnoagent -Djava.compiler=NONE\ > > > > > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$DEBUG_PORT\ > > -jar $DAEMON_HOME/bootstrapper.jar \ > > $StringUtils.toUpperCase(${name})_HOME start > > ;; > > > > *) > > echo "Usage ${name} [start|stop|debug]" > > exit 1;; > > esac > > > > > > > > > > ------=_Part_18580_3891642.1175134236869 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Post startup?  Hmmm I don't think so since these parameters are needed to initialize the
different memory pools for various memory models.  However I could be wrong.
 
Regards,
Alex

 
On 3/28/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
Yeah - Would be nice if the server.xml file could contain default
alternatives.

Anyone know if we can inject min/max heap size parameters into the JVM
post startup?

Thanks,
- Ole


Alex Karasulu wrote:
> We might want to look at making some things like the min max heap
> sizes variable with defaults.  However this we can do
> later after getting everything working.
>
> Alex
>
>
> On 3/21/07, *Ole Ersoy* <ole.ersoy@gmail.com
> <mailto:ole.ersoy@gmail.com>> wrote:
>
>     I've tried to reduce our start/stop shell script to a minimum needed
>     for RPM (I think Solaris, Mac, *NIX in general).
>
>     I still need to test it out of coarse, but I thought I'd throw it out
>     here in case anyone has a chance to kick it.
>
>     Just substitute apacheds for ${name} (It's a pseudo template - The
>     final
>     one will be a jet template....)
>
>
>     #!/bin/bash
>     #
>     # chkconfig: - 91 35
>     # description: Starts and stops ${name} server.
>     #
>     # Shell script to start/stop ${name}
>     # If you want to change ${name} service settings please modify the
>     server.xml
>     # file.
>     #
>
>
>     # Source function library.
>     if [ -f /etc/init.d/functions ] ; then
>         . /etc/init.d/functions
>     fi
>
>     # Source networking configuration.
>     if [ -f /etc/sysconfig/network ] ; then
>         . /etc/sysconfig/network
>     fi
>
>     # Check that networking is up.
>     if [ ! -z "$NETWORKING" ] ; then
>          if [ "$NETWORKING" = "no" ] ; then
>               exit 0
>          fi
>     fi
>
>     prog=$"${name} server"
>     StringUtils.toUpperCase (${name})_HOME=/usr/share/${name}-${version}
>     #So for ApacheDS this would be
>     # APACHEDS_HOME = /usr/share/apacheds-1.0.1
>
>     if [ -z "$JAVA_HOME" ] ; then
>     echo "Error: JAVA_HOME environment variable is not set."
>     echo "You will need to set the JAVA_HOME environment variable to"
>     echo "the the path of the root java  installation directory."
>     echo "See the installation guide for further instructions."
>     else
>     echo JAVA_HOME=$JAVA_HOME
>     fi
>
>
>     DAEMON_HOME=$APACHEDS_HOME/bin
>     CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
>
>     #The statement below will probably be shortened to
>     #$DAEMON_HOME/bootstrapper.jar
>     #when we figure out how to use the daemon and logger from
>     /usr/share/java instead.
>
>     CLASSPATH=$CLASSPATH:$DAEMON_HOME/bootstrapper.jar:$DAEMON_HOME/logger.jar:$DAEMON_HOME/daemon.jar
>
>     echo CLASSPATH=$CLASSPATH
>     StringUtils.toUpperCase(${name})_USER=$USER
>
>     TMP_DIR=/var/tmp/${name}-${version}
>     PID_FILE=/var/run/${name}-${version}/server.pid
>
>     cd $StringUtils.toUpperCase(${name})_HOME
>
>     case "$1" in
>     start)
>        #
>        # Start apacheds
>        #
>        echo -n $"Starting $prog: "
>        ulimit -S -c 0 >/dev/null 2>&1
>        RETVAL=0
>
>        $DAEMON_HOME/apacheds \
>        -user $StringUtils.toUpperCase(${name})_USER \
>        -home $JAVA_HOME \
>        -Djava.io.tmpdir=$TMP_DIR \
>
>     -Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\
>        -Xms384m -Xmx384m \
>        -pidfile $PID_FILE \
>        -outfile /var/log/${name}-${version}/${name}- stdout.log \
>        -errfile /var/log/${name}-${version}/${name}-stderr.log \
>        -cp $CLASSPATH \
>        org.apache.directory.daemon.JsvcBootstrapper \
>        $StringUtils.toUpperCase(${name})_HOME start
>
>        [ "$RETVAL" -eq 0 ] && success $"apacheds server startup" || \
>             failure $"${name} server start"
>        echo
>        if [ -d /var/lock/subsys ] ; then
>               [ "$RETVAL" -eq 0 ] && touch
>     /var/${name}-${version}/apacheds.lock
>        fi
>
>        exit $RETVAL
>        ;;
>
>     stop)
>        #
>        # Stop ${name}
>        #
>        echo -n $"Shutting down $prog: "
>        RETVAL=0
>
>        $DAEMON_HOME/${name} \
>        -stop \
>        -pidfile $PID_FILE \
>
>     -
>     Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\
>        org.apache.directory.daemon.JsvcBootstrapper stop
>
>         [ "$RETVAL" -eq 0 ] && success $"apacheds server shutdown" || \
>              failure $"apacheds server shutdown"
>         echo
>         if [ -d /var/lock/subsys/apacheds ] ; then
>                [ "$RETVAL" -eq 0 ] && rm $APACHEDS_HOME/var/apacheds.lock
>         fi
>
>        exit $RETVAL
>        ;;
>
>     debug)
>        #
>        # Debug ${name}
>        #
>        echo -n $"Starting $prog in debug mode: "
>        ulimit -S -c 0 >/dev/null 2>&1
>        RETVAL=0
>
>        if [ -z "$2" ] ; then
>          echo
>          echo ========================================================
>          echo "Warning: the debug port is not set. Using 5005 default."
>          echo ========================================================
>          echo
>          DEBUG_PORT=5005
>        else
>          DEBUG_PORT="$2"
>        fi
>
>        $JAVA_HOME/bin/java\
>
>     -Dlog4j.configuration=file://$StringUtils.toUpperCase(${name})_HOME/conf/log4j.properties\
>        -Xms384m -Xmx384m \
>        -Dcom.sun.management.jmxremote \
>        -Xdebug -Xnoagent -Djava.compiler=NONE\
>
>     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$DEBUG_PORT\
>        -jar $DAEMON_HOME/bootstrapper.jar \
>        $StringUtils.toUpperCase(${name})_HOME start
>        ;;
>
>     *)
>        echo "Usage ${name} [start|stop|debug]"
>        exit 1;;
>     esac
>
>
>
>


------=_Part_18580_3891642.1175134236869--