mirror of https://github.com/apache/activemq.git
- Backported some fix to the command line scripts.
- Also supporeted bstat --help for AMQ-702 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/branches/activemq-4.0@413795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
142f2ea670
commit
396c25dc16
|
@ -130,7 +130,7 @@ if [ -z "$ACTIVEMQ_OPTS" ] ; then
|
|||
fi
|
||||
|
||||
#SUNJMX="-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
|
||||
SUNJMX=""
|
||||
SUNJMX="-Dcom.sun.management.jmxremote"
|
||||
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $SUNJMX"
|
||||
# Uncomment to enable YourKit profiling
|
||||
#ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
@ -140,8 +140,9 @@ ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $SUNJMX"
|
|||
|
||||
#ACTIVEMQ_TASK="start"
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ echo.
|
|||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
|
||||
|
||||
set SUNJMX=
|
||||
REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
|
||||
|
@ -102,7 +102,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
|||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="start"
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Dactivemq.home="%ACTIVEMQ_HOME%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Dactivemq.home="%ACTIVEMQ_HOME%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
|
@ -117,3 +117,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -135,8 +135,9 @@ fi
|
|||
|
||||
ACTIVEMQ_TASK="browse"
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
|||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="browse"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
@ -113,3 +113,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -136,7 +136,14 @@ fi
|
|||
ACTIVEMQ_TASK="query"
|
||||
|
||||
BROKER_NAME=$1
|
||||
if [ -z "$BROKER_NAME" ] ; then
|
||||
if [ "$BROKER_NAME" = "--help" -o "$BROKER_NAME" = "-h" -o "$BROKER_NAME" = "-?" ] ; then
|
||||
echo
|
||||
echo Performs a predefined query that displays useful statistics regarding the specified broker.
|
||||
echo If no broker name is specified, it will try and select from all registered brokers.
|
||||
echo Usage: bstat [brokerName] [--jmxurl url]
|
||||
echo
|
||||
exit 0
|
||||
elif [ -z "$BROKER_NAME" ] ; then
|
||||
BROKER_NAME="*"
|
||||
fi
|
||||
shift
|
||||
|
@ -151,8 +158,9 @@ fi
|
|||
QUERY_PARAM="--objname Type=*,BrokerName=${BROKER_NAME} -xQTopic=ActiveMQ.Advisory.* --view Type,BrokerName,Destination,ConnectorName,EnqueueCount,DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages,TotalMessages,ConsumerCount,TotalConsumerCount,DispatchQueueSize"
|
||||
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $QUERY_PARAM $ACTIVEMQ_CMD_LINE_ARGS
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $QUERY_PARAM $ACTIVEMQ_CMD_LINE_ARGS
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $QUERY_PARAM $ACTIVEMQ_CMD_LINE_ARGS
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $QUERY_PARAM $ACTIVEMQ_CMD_LINE_ARGS
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,11 @@ set DEFAULT_ACTIVEMQ_HOME=
|
|||
|
||||
rem Assume first parameter is broker name
|
||||
set BROKER_NAME=%1
|
||||
if "%BROKER_NAME%" == "--help" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-h" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-?" goto dispHelp
|
||||
if "%BROKER_NAME%" == "" set BROKER_NAME=*
|
||||
|
||||
shift
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
|
@ -109,11 +113,19 @@ rem Select all components that belongs to the specified broker except advisory t
|
|||
rem and display the specified attributes
|
||||
set QUERY_PARAM=--objname "Type=*,BrokerName=%BROKER_NAME%" "-xQTopic=ActiveMQ.Advisory.*" --view "Type,BrokerName,Destination,ConnectorName,EnqueueCount,DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages,TotalMessages,ConsumerCount,TotalConsumerCount,DispatchQueueSize"
|
||||
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %QUERY_PARAM% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %QUERY_PARAM% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
:dispHelp
|
||||
|
||||
echo.
|
||||
echo Performs a predefined query that displays useful statistics regarding the specified broker.
|
||||
echo If no broker name is specified, it will try and select from all registered brokers.
|
||||
echo Usage: bstat [brokerName] [--jmxurl url]
|
||||
echo.
|
||||
|
||||
goto end
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
|
@ -125,3 +137,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -135,8 +135,9 @@ fi
|
|||
|
||||
ACTIVEMQ_TASK="list"
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
|||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="list"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
@ -113,3 +113,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -135,8 +135,9 @@ fi
|
|||
|
||||
ACTIVEMQ_TASK="query"
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
|||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="query"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
@ -113,3 +113,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -135,8 +135,9 @@ fi
|
|||
|
||||
ACTIVEMQ_TASK="stop"
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar ${ACTIVEMQ_HOME}/bin/run.jar $ACTIVEMQ_TASK $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS -classpath "" -Dactivemq.home="${ACTIVEMQ_HOME}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
|||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="stop"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar %ACTIVEMQ_HOME%/bin/run.jar %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
@ -113,3 +113,4 @@ if "%OS%"=="Windows_NT" @endlocal
|
|||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue