Changeset 2785

Show
Ignore:
Timestamp:
02/18/10 11:26:35
Author:
douglm
Message:

Add debugging parameters to the start script

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.6/build/quickstart/linux/startjboss

    r2782 r2785  
    1010 
    1111usage() { 
    12   echo "  $PRG [-heap size] [-newsize size] [-permsize size] " 
     12  echo "  $PRG [-heap size] [-newsize size] [-permgen size] [-debug]" 
     13  echo "       [-debugmodule name]" 
    1314  echo "" 
    1415  echo " Where:" 
    1516  echo "" 
    1617  echo " -heap sets the heap size and should be n for bytes" 
    17   echo "                                        nK for kilo-bytes (e.g. 256K)" 
    18   echo "                                        nM for mega-bytes (e.g. 256M)" 
     18  echo "                                        nK for kilo-bytes (e.g. 2560000K)" 
     19  echo "                                        nM for mega-bytes (e.g. 2560M)" 
    1920  echo "                                        nG for giga-bytes (e.g. 1G)" 
    2021  echo "" 
     
    2324  echo "" 
    2425  echo " -permsize sets the permgen size and has the same form as -heap" 
    25   echo "  The value should probably not be less than 256M" 
     26  echo "  The value should probably not be less than 256M" 
    2627  echo "" 
     28  echo " -debug sets the logging level to DEBUG" 
     29  echo "" 
     30  echo " -debugmodule sets the logging level for module name to DEBUG" 
     31  echo "  This sets a system variable org.bedework.loglevel.<name> which" 
     32  echo "  may be referenced by the log4j configuration" 
    2733  echo "" 
    2834  echo "Default settings:" 
     
    3137  echo "permsize = $permsize" 
    3238  echo "" 
    33   echo "" 
    3439} 
    3540 
     
    3742newsize="330M" 
    3843permsize="256M" 
     44 
     45LOG_THRESHOLD="-Djboss.server.log.threshold=INFO" 
     46LOG_LEVELS="" 
    3947 
    4048while [ "$1" != "" ] 
     
    6169      shift 
    6270      permsize="$1" 
     71      shift 
     72      ;; 
     73    -debug) 
     74      shift 
     75      LOG_THRESHOLD="-Djboss.server.log.threshold=DEBUG" 
     76      ;; 
     77    -debugmodule) 
     78      shift 
     79      LOG_LEVELS="$LOG_LEVELS -Dorg.bedework.loglevel.$1=DEBUG" 
    6380      shift 
    6481      ;; 
     
    91108ACTIVEMQ_DIRPREFIX="-Dorg.apache.activemq.default.directory.prefix=$JBOSS_DATA_DIR/" 
    92109 
    93 LOG_THRESHOLD="-Djboss.server.log.threshold=DEBUG" 
    94  
    95110BW_DATA_DIR=$JBOSS_DATA_DIR/bedework 
    96111BW_DATA_DIR_DEF=-Dorg.bedework.data.dir=$BW_DATA_DIR/ 
     
    100115export JAVA_OPTS="$JAVA_OPTS -XX:PermSize=$permsize -XX:MaxPermSize=$permsize" 
    101116 
    102 RUN_CMD="./$JBOSS_VERSION/bin/run.sh -c $JBOSS_CONFIG $JBOSS_BIND $JBOSS_PORTS $LOG_THRESHOLD $ACTIVEMQ_DIRPREFIX $BW_DATA_DIR_DEF" 
     117RUN_CMD="./$JBOSS_VERSION/bin/run.sh -c $JBOSS_CONFIG $JBOSS_BIND $JBOSS_PORTS $LOG_THRESHOLD $LOG_LEVELS $ACTIVEMQ_DIRPREFIX $BW_DATA_DIR_DEF" 
    103118 
    104119echo $RUN_CMD