13.4.1-4.1 baseline (recovered lost bin directories for 13.4.1-4)

Former-commit-id: dca18e1b350f5424ec129b6cd0d602ceb86e119b
This commit is contained in:
Steve Harris 2013-05-03 09:20:30 -05:00
parent 7a78f8ac6e
commit 0f76c3cbee
304 changed files with 22586 additions and 0 deletions

View file

@ -0,0 +1,49 @@
#!/bin/sh
exe=$0
while test -L "$exe"; do
exe=`readlink "$exe"`
done
bin_dir=`dirname "$exe"`
bin_dir=`cd "$bin_dir";pwd`
rs_home_dir=`cd "$bin_dir/..";pwd`
props=com.raytheon.rcm
lib_dir="$rs_home_dir/lib"
cfg_dir="$rs_home_dir/data/config"
cp=
for jar in "$lib_dir"/*.jar; do
cp=$cp:$jar
done
java=/awips2/java/bin/java
decompress_products=yes
config_file="$cfg_dir/start-config"
. "$config_file" || { echo "could not read $config_file"; exit 1 ;}
if test -n "$edex_endpoint_arg"; then
edex_endpoint_arg_2="-D$props.edexRadarEndpoint=$edex_endpoint_arg"
fi
if test -z "$log_file"; then
log_file=/dev/null
fi
if test -n "$configuration_provider"; then
cfg_provider_arg_2="-D$props.server.RadarServer.configurationProviderClass=$configuration_provider"
fi
if test -n "$awips1_root"; then
awips1_root_arg_2="-D$props.awips1.resourceRoot=$awips1_root"
fi
if test -n "$awips1_site"; then
awips1_site_arg_2="-D$props.awips1.FXA_LOCAL_SITE=$awips1_site"
fi
exec $java -cp "$cp" \
"-D$props.configDir=$cfg_dir" \
"-D$props.awips1.decompressRadarProducts=$decompress_products" \
$edex_endpoint_arg_2 \
$cfg_provider_arg_2 \
$awips1_root_arg_2 \
$awips1_site_arg_2 \
com.raytheon.rcm.config.importer.Importer

View file

@ -0,0 +1,76 @@
#!/bin/sh
exe=$0
while test -L "$exe"; do
exe=`readlink "$exe"`
done
bin_dir=`dirname "$exe"`
bin_dir=`cd "$bin_dir";pwd`
rs_home_dir=`cd "$bin_dir/..";pwd`
props=com.raytheon.rcm
lib_dir="$rs_home_dir/lib"
cfg_dir="$rs_home_dir/data/config"
cp=
for jar in "$lib_dir"/*.jar; do
cp=$cp:$jar
done
cp="$cfg_dir/res:$cp"
JAVA_INSTALL="/awips2/java"
java=${JAVA_INSTALL}/bin/java
decompress_products=yes
config_file="$cfg_dir/start-config"
. "$config_file" || { echo "could not read $config_file"; exit 1 ;}
if test -n "$edex_endpoint_arg"; then
edex_endpoint_arg_2="-D$props.edexRadarEndpoint=$edex_endpoint_arg"
fi
if test -z "$log_dir"; then
log_dir=$rs_home_dir/data/logs
echo "Writing logs at $log_dir"
fi
if test -n "$configuration_provider"; then
cfg_provider_arg_2="-D$props.server.RadarServer.configurationProviderClass=$configuration_provider"
fi
if test -n "$awips1_root"; then
awips1_root_arg_2="-D$props.awips1.resourceRoot=$awips1_root"
fi
if test -n "$awips1_site"; then
awips1_site_arg_2="-D$props.awips1.FXA_LOCAL_SITE=$awips1_site"
fi
if [ ! -f "$java" ]; then
echo "Java is not correct : $java"
exit
fi
if [ -f "$rs_home_dir/data/radarserver-pid" ]; then
pid=`cat $rs_home_dir/data/radarserver-pid`
echo "Radar Server already started at process $pid. Run stop before restarting."
exit 0
fi
# giving rw permissions to all users
umask 000
$java -cp "$cp" \
"-D$props.configDir=$cfg_dir" \
"-D$props.awips1.decompressRadarProducts=$decompress_products" \
"-D$props.logDir=$log_dir" \
"-Dlog4j.configuration=log4j.properties" \
"-Dqpid.dest_syntax=BURL" \
"-Dawips2_fxa=$awips2_fxa" \
$edex_endpoint_arg_2 \
$cfg_provider_arg_2 \
$awips1_root_arg_2 \
$awips1_site_arg_2 \
com.raytheon.rcm.mqsrvr.MQServer > /dev/null 2>&1 &
pid=$!
echo "RadarServer started at process $pid"
echo "$pid" > "$rs_home_dir/data/radarserver-pid"

View file

@ -0,0 +1,26 @@
#!/bin/sh
exe=$0
while test -L "$exe"; do
exe=`readlink "$exe"`
done
bin_dir=`dirname "$exe"`
bin_dir=`cd "$bin_dir";pwd`
rs_home_dir=`cd "$bin_dir/..";pwd`
pid_file=$rs_home_dir/data/radarserver-pid
if [ -f $pid_file ]
then
pid=`cat "$pid_file"`
if test -n "$pid"; then
rm -f "$pid_file"
if kill "$pid"; then
echo "Killing radar server at process $pid, also removing pid file."
exit 0
fi
else
echo "Cannot find pid of radar server, please kill it manually."
fi
else
echo "File does not exist to find pid. It may not be running or it might need to be killed manually."
fi
exit 1

View file

@ -0,0 +1,17 @@
#!/bin/sh
# Need to make sure we determine what TMCP_HOME should
# be if it is not set.
dir=${0%/*}
if [ "$dir" = "$0" ]; then
dir="."
fi
cd "$dir/.."
if [ ! -n "${TMCP_HOME}" ]
then
export TMCP_HOME=.
fi
DISPLAY=$1:0.0; export DISPLAY
$TMCP_HOME/bin/MonitorTestMode &

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,55 @@
#!/bin/sh
# determine where the script is being ran from.
path_to_script=`readlink -f $0`
RUN_FROM_DIR=`dirname ${path_to_script}`
BASE_ENV_DIR=`dirname ${RUN_FROM_DIR}`
if [ ! -n "${TMCP_HOME}" ]
then
echo -e "\e[1;31mTMCP_HOME is not set.\e[m"
echo -e "\e[0;32mSetting TMCP_HOME to '${BASE_ENV_DIR}'.\e[m"
export TMCP_HOME=${BASE_ENV_DIR}
else
echo "TMCP_HOME is '${TMCP_HOME}'"
fi
if [ ! -n "${FXA_HOME}" ]
then
echo -e "\e[1;31mFXA_HOME is not set.\e[m"
echo -e "\e[0;32mSetting FXA_HOME to '${BASE_ENV_DIR}'.\e[m"
export FXA_HOME=${BASE_ENV_DIR}
else
echo "FXA_HOME is '${FXA_HOME}'"
fi
# determine if 'FXA_WARNGEN_PRODUCT_ID' needs to be set
HOST=`uname -n`
TMP_HOST_NUMBER=`uname -n | awk '{print substr($1, 3, 1);}'`
ALT_HOST_PART=`uname -n | awk '{print substr($1, 3, length($1) - 1);}'`
ALT_HOST="xt"${ALT_HOST_PART}
ping -c 1 -w 1 ${ALT_HOST} >/dev/null 2>/dev/null
RC=`echo $?`
if [ "${RC}" = "0" ]
then
if [ ! -n "${FXA_WARNGEN_PRODUCT_ID}" ]
then
echo -e "\e[1;31mFXA_WARNGEN_PRODUCT_ID is not set.\e[m"
echo -e "\e[0;32mSetting FXA_WARNGEN_PRODUCT_ID to '${TMP_HOST_NUMBER}'.\e[m"
export FXA_WARNGEN_PRODUCT_ID=${TMP_HOST_NUMBER}
else
echo "FXA_WARNGEN_PRODUCT_ID is '${FXA_WARNGEN_PRODUCT_ID}'."
fi
fi
export LD_LIBRARY_PATH=$TMCP_HOME/lib:$LD_LIBRARY_PATH
# for TMCP logs
if [ ! -d $HOME/tmcpLogs ]; then
mkdir $HOME/tmcpLogs
fi
export LOG_DIR=$HOME/tmcpLogs
$TMCP_HOME/bin/tmcp

Binary file not shown.

View file

@ -0,0 +1,22 @@
#!/bin/sh
# Need to make sure we determine what TMCP_HOME should
# be if it is not set because this script may be ran
# remotely under certain conditions.
dir=${0%/*}
if [ "$dir" = "$0" ]; then
dir="."
fi
cd "$dir/.."
if [ ! -n "${TMCP_HOME}" ]
then
export TMCP_HOME=.
fi
if [ $6 = "kde" ]
then
kstart --alldesktops $TMCP_HOME/bin/showBanner $2 $3 $4 $5 &
else
$TMCP_HOME/bin/showBanner $2 $3 $4 $5 &
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,206 @@
=========================================================================
== Apache License ==
=========================================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -0,0 +1,8 @@
// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Qpid bin scripts
// ------------------------------------------------------------------
Apache Qpid
Copyright 2006-2008 Apache Software Foundation

View file

@ -0,0 +1,71 @@
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
#!/bin/sh
qpid_version=$1
repo=$2
if [ -z "$qpid_version" -o -z "$repo" ]; then
echo "Usage: mvn-deploy-qpid-java.sh <qpid-version> <mvn-repo>"
exit 1
fi
set -xe
build_dir=build/lib
deploy_artifact() {
mvn deploy:deploy-file -DuniqueVersion=false -Durl=$repo -Dfile=${build_dir}/$1-${qpid_version}.jar -DgroupId=org.apache.qpid -DartifactId=$1 -Dversion=${qpid_version} -Dpackaging=jar
}
deploy_artifact_with_classifier() {
mvn deploy:deploy-file -DuniqueVersion=false -Durl=$repo -Dfile=${build_dir}/$1-$2-${qpid_version}.jar -DgroupId=org.apache.qpid -DartifactId=$1 -Dclassifier=$2 -Dversion=${qpid_version} -Dpackaging=jar
}
deploy_artifact qpid-broker
deploy_artifact_with_classifier qpid-broker-plugins tests
deploy_artifact_with_classifier qpid-broker tests
deploy_artifact qpid-client-example
deploy_artifact_with_classifier qpid-client-example tests
deploy_artifact qpid-client
deploy_artifact_with_classifier qpid-client tests
deploy_artifact qpid-common
deploy_artifact_with_classifier qpid-common tests
deploy_artifact qpid-integrationtests
deploy_artifact_with_classifier qpid-integrationtests tests
deploy_artifact qpid-junit-toolkit
deploy_artifact_with_classifier qpid-junit-toolkit tests
deploy_artifact qpid-management-eclipse-plugin
deploy_artifact_with_classifier qpid-management-eclipse-plugin tests
deploy_artifact qpid-perftests
deploy_artifact_with_classifier qpid-perftests tests
deploy_artifact qpid-systests
deploy_artifact_with_classifier qpid-systests tests
deploy_artifact qpid-testkit
deploy_artifact_with_classifier qpid-testkit tests
deploy_artifact qpid-tools
deploy_artifact_with_classifier qpid-tools tests
build_dir=build/lib/plugins
deploy_artifact qpid-broker-plugins

View file

@ -0,0 +1,251 @@
#!/bin/sh
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
# Script to pull together an Apache Release
#
usage()
{
echo "Usage: release.sh <svn-path> <svn-revision> <version> [options]"
echo
echo "Options: Default : --prepare --svn --all --sign"
echo "--help |-h : Show this help"
echo "--prepare : Export specified tree from source control"
echo "--svn : Export from svn"
echo "--git : Export from git repository with svn metadata"
echo "--clean-all : Remove build artefacts and downloaded svn tree"
echo "--clean : Remove built artefacts"
echo "--all |-a : Generate all artefacts"
echo "--source|-e : Generate the source artefact"
echo "--cpp |-c : Generate the CPP artefacts"
echo "--dotnet|-d : Generate the dotnet artefacts"
echo "--java |-j : Generate the java artefacts"
echo "--ruby |-r : Generate the ruby artefacts"
echo "--python|-p : Generate the python artefacts"
echo "--wcf |-w : Generate the WCF artefacts"
echo "--source|-e : Generate the source artefact"
echo "--sign |-s : Sign generated artefacts"
echo "--upload|-u : Upload the artifacts directory to people.apache.org as qpid-\$VER"
echo
}
REPO="SVN"
for arg in $* ; do
case $arg in
--help|-h)
HELP="HELP"
;;
--prepare)
PREPARE="PREPARE"
;;
--svn)
REPO="SVN"
;;
--git)
REPO="GIT"
;;
--clean-all)
CLEAN="CLEAN"
CLEAN_ARTIFACTS="CLEAN_ARTIFACTS"
;;
--clean)
CLEAN_ARTIFACTS="CLEAN_ARTIFACTS"
;;
--sign|-s)
SIGN="SIGN"
;;
--all|-a)
CPP="CPP"
DOTNET="DOTNET"
JAVA="JAVA"
RUBY="RUBY"
PYTHON="PYTHON"
WCF="WCF"
SOURCE="SOURCE"
;;
--cpp|-c)
CPP="CPP"
;;
--dotnet|-d)
DOTNET="DOTNET"
;;
--java|-j)
JAVA="JAVA"
;;
--ruby|-r)
RUBY="RUBY"
;;
--python|-p)
PYTHON="PYTHON"
;;
--wcf|-w)
WCF="WCF"
;;
--source|-e)
SOURCE="SOURCE"
;;
--upload|-u)
UPLOAD="UPLOAD"
;;
*)
if [ -z "$SVN" ] ; then
SVN=$arg
continue
fi
if [ -z "$REV" ] ; then
REV=$arg
continue
fi
if [ -z "$VER" ] ; then
VER=$arg
continue
fi
;;
esac
done
if [ -n "${HELP}" ] ; then
usage
exit 0
fi
if [ -z "$SVN" -o -z "$REV" -o -z "$VER" ]; then
echo "Usage: release.sh <svn-path> <svn-revision> <version>"
exit 1
fi
echo SVN:$SVN
echo REV:$REV
echo VER:$VER
# If nothing is specified then do it all
if [ -z "${CLEAN}${PREPARE}${CPP}${DOTNET}${JAVA}${RUBY}${PYTHON}${WCF}${SOURCE}${SIGN}${UPLOAD}" ] ; then
PREPARE="PREPARE"
CPP="CPP"
DOTNET="DOTNET"
JAVA="JAVA"
RUBY="RUBY"
PYTHON="PYTHON"
WCF="WCF"
SOURCE="SOURCE"
SIGN="SIGN"
fi
set -xe
if [ "CLEAN" == "$CLEAN" ] ; then
rm -rf qpid-${VER}
fi
if [ "CLEAN_ARTIFACTS" == "$CLEAN_ARTIFACTS" ] ; then
rm -rf artifacts
fi
if [ "PREPARE" == "$PREPARE" ] ; then
mkdir artifacts
case ${REPO} in
SVN)
URL=https://svn.apache.org/repos/asf/qpid/${SVN}
svn export -r ${REV} ${URL} qpid-${VER}
echo ${URL} ${REV} > artifacts/qpid-${VER}.svnversion
;;
GIT)
URL=${SVN}
GITREV=$(GIT_DIR=${URL} git svn find-rev r${REV})
git archive --remote=${URL} ${GITREV} | tar xvf -
mv qpid qpid-${VER}
echo ${REV} > artifacts/qpid-${VER}.svnversion
;;
esac
fi
if [ "SOURCE" == "$SOURCE" ] ; then
tar -czf artifacts/qpid-${VER}.tar.gz qpid-${VER}
fi
if [ "RUBY" == "$RUBY" ] ; then
tar -czf artifacts/qpid-ruby-${VER}.tar.gz qpid-${VER}/ruby qpid-${VER}/specs
fi
if [ "PYTHON" == "$PYTHON" ] ; then
tar -czf artifacts/qpid-python-${VER}.tar.gz qpid-${VER}/python qpid-${VER}/specs
fi
if [ "WCF" == "$WCF" ] ; then
zip -rq artifacts/qpid-wcf-${VER}.zip qpid-${VER}/wcf
fi
if [ "CPP" == "$CPP" ] ; then
pushd qpid-${VER}/cpp
./bootstrap
./configure
make dist -j2
popd
cp qpid-${VER}/cpp/*.tar.gz artifacts/qpid-cpp-${VER}.tar.gz
fi
if [ "JAVA" == "$JAVA" ] ; then
pushd qpid-${VER}/java
ant build release release-bin -Dsvnversion.output=${REV}
popd
cp qpid-${VER}/java/release/*.tar.gz artifacts/qpid-java-${VER}.tar.gz
cp qpid-${VER}/java/broker/release/*.tar.gz artifacts/qpid-java-broker-${VER}.tar.gz
cp qpid-${VER}/java/client/release/*.tar.gz artifacts/qpid-java-client-${VER}.tar.gz
#cp qpid-${VER}/java/client/example/release/*.tar.gz
cp qpid-${VER}/java/management/eclipse-plugin/release/*.tar.gz qpid-${VER}/java/management/eclipse-plugin/release/*.zip artifacts/
cp qpid-${VER}/java/management/client/release/*.tar.gz artifacts/qpid-management-client-${VER}.tar.gz
fi
if [ "DOTNET" == "$DOTNET" ] ; then
pushd qpid-${VER}/dotnet
cd Qpid.Common
ant
cd ..
./build-nant-release mono-2.0
cd client-010/gentool
ant
cd ..
nant -t:mono-2.0 release-pkg
popd
cp qpid-${VER}/dotnet/bin/mono-2.0/release/*.zip artifacts/qpid-dotnet-0-8-${VER}.zip
cp qpid-${VER}/dotnet/client-010/bin/mono-2.0/debug/*.zip artifacts/qpid-dotnet-0-10-${VER}.zip
fi
if [ "SIGN" == "$SIGN" ] ; then
pushd artifacts
sha1sum *.zip *.gz *.svnversion > SHA1SUM
if [ ! -z $SIGNING_KEY ] ; then
KEYOPTION="--default-key $SIGNING_KEY"
fi
for i in `find . | egrep 'jar$|pom$|gz$|zip$|svnversion$|SHA1SUM'`; do gpg --sign --armor --detach $KEYOPTION $i; done;
popd
fi
if [ "UPLOAD" == "$UPLOAD" ] ; then
scp -r artifacts people.apache.org:qpid-${VER}
fi

View file

@ -0,0 +1,133 @@
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This script will set the proper svn properties on all the files in the tree.
# It pretty much requires a gnu compatible xargs (for the -r flag). Running
# on Linux is probably the best option, or gnuxargs is available for OS X from
# darwinports.
find . -name "*.java" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.java" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.py" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.rb" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.xml" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.xml" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.xml" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.xsl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.xsl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.xsl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.xsd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.xsd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.xsd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.wsdl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.wsdl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.wsdl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.properties" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.properties" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.properties" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.txt" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.txt" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.htm*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.htm*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/html
find . -name "*.htm*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "README*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "README*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "LICENSE*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "LICENSE*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "NOTICE*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "NOTICE*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "TODO*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "TODO*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "KEYS*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "KEYS*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.png" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type image/png
find . -name "*.gif" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type image/gif
find . -name "*.jpg" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type image/jpeg
find . -name "*.jpeg" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type image/jpeg
find . -name "*.scdl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.scdl" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.fragment" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.fragment" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.componentType" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.componentType" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.wsdd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "*.wsdd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "sca.subsystem" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "sca.subsystem" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "Tuscany-model.config" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/xml
find . -name "Tuscany-model.config" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.cpp" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.cpp" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.c" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.c" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.h" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.h" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "*.am" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.am" | grep -v ".svn" | xargs -n 1 -r svn propset svn:keywords "Rev Date"
find . -name "ChangeLog*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "ChangeLog*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.sh" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.sh" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.sh" | grep -v ".svn" | xargs -n 1 -r svn propset svn:executable ""
find . -name "*.bat" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style CRLF
find . -name "*.bat" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.cmd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "*.cmd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "*.cmd" | grep -v ".svn" | xargs -n 1 -r svn propset svn:executable ""
find . -name "INSTALL*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "INSTALL*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "COPYING*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "COPYING*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain
find . -name "NEWS*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:eol-style native
find . -name "NEWS*" | grep -v ".svn" | xargs -n 1 -r svn propset svn:mime-type text/plain

View file

@ -0,0 +1,36 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@REM Create example keystore for broker and trust store for client/management console.
@REM
@REM Use generated qpid.keystore as the brokers keystore
@REM Use generated qpid.truststore as client/consoles truststore
@REM All passwords have value: password
@REM Create Broker Keystore:
keytool -genkey -alias qpidBroker -keyalg RSA -validity 365 -keystore qpid.keystore -storepass password -keypass password -dname "CN=hostname, OU=OrgUnit, O=Org, L=City, C=US"
@REM Export Self Signed Cert:
keytool -export -alias qpidBroker -keystore qpid.keystore -file qpidBroker.cer -storepass password
@REM Import Broker Cert Into MC TrustStore:
keytool -import -alias qpidBrokerCert -file qpidBroker.cer -keystore qpid.truststore -storepass password -noprompt
@REM Delete the cert
del qpidBroker.cer

View file

@ -0,0 +1,38 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Create example keystore for broker and trust store for client/management console.
#
# Use generated qpid.keystore as the brokers keystore
# Use generated qpid.truststore as client/consoles truststore
# All passwords have value: password
#Create Broker Keystore:
keytool -genkey -alias qpidBroker -keyalg RSA -validity 365 -keystore qpid.keystore \
-storepass password -keypass password -dname "CN=hostname, OU=OrgUnit, O=Org, L=City, C=US"
#Export Self Signed Cert:
keytool -export -alias qpidBroker -keystore qpid.keystore -file qpidBroker.cer -storepass password
#Import Broker Cert Into MC TrustStore:
keytool -import -alias qpidBrokerCert -file qpidBroker.cer -keystore qpid.truststore -storepass password -noprompt
#Delete the cert
rm qpidBroker.cer

View file

@ -0,0 +1,60 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
die() {
if [[ $1 = -usage ]]; then
shift
usage=true
else
usage=false
fi
echo "$@"
$usage && echo
$usage && usage
exit 1
}
cygwin=false
if [[ "$(uname -a | fgrep Cygwin)" != "" ]]; then
cygwin=true
fi
if [ -z "$QPID_TOOLS" ]; then
if [ -z "$QPID_HOME" ]; then
die "QPID_TOOLS must be set"
else
QPID_TOOLS=$QPID_HOME
fi
fi
if $cygwin; then
QPID_TOOLS=$(cygpath -w $QPID_TOOLS)
fi
# Set classpath to include Qpid jar with all required jars in manifest
QPID_LIBS=$QPID_TOOLS/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_OPTS=-Dlog4j.configuration=file:$QPID_TOOLS/etc/mstool-log4j.xml \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run org.apache.qpid.tools.messagestore.MessageStoreTool "$@"

View file

@ -0,0 +1,35 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
export PATH=${PATH}:${QPID_HOME}/bin
fi
# Set classpath to include Qpid jar with all required jars in manifest
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run org.apache.qpid.tools.security.Passwd "$@"

View file

@ -0,0 +1,39 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
export PATH=${PATH}:${QPID_HOME}/bin
fi
# Set classpath to include Qpid jar with all required jars in manifest
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/bdbstore-launch.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
QPID_CLASSPATH=$QPID_LIBS \
QPID_RUN_LOG=2
QPID_OPTS="$QPID_OPTS -Damqj.read_write_pool_size=32 -DQPID_LOG_APPEND=$QPID_LOG_APPEND"
. qpid-run org.apache.qpid.server.Main "$@"

View file

@ -0,0 +1,22 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
set BDBSTORE_HOME=c:\qpid\trunk\java\bdbstore
set QPID_MODULE_JARS=%BDBSTORE_HOME%\target\qpid-bdbstore-1.0-incubating-M2-SNAPSHOT.jar;%BDBSTORE_HOME%\lib\bdb\je-3.1.0.jar
.\qpid-server.bat

View file

@ -0,0 +1,203 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
REM set QPID_WORK if not set
if not "%QPID_WORK%" == "" goto okQpidWork
if "%HOME%" == "" goto noHome
set QPID_WOKR=%HOME%
goto okQpidWork
:noHome
set QPID_WORK=c:\Temp
if not exist %QPID_WORK% md %QPID_WORK%
:okQpidWork
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto end
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto end
:okJavaHome
REM set loggin level if not set
if "%AMQJ_LOGGING_LEVEL%" == "" set AMQJ_LOGGING_LEVEL=info
REM Set the default system properties that we'll use now that they have
REM all been initialised
set SYSTEM_PROPS=-Damqj.logging.level=%AMQJ_LOGGING_LEVEL% -DQPID_HOME=%QPID_HOME% -DQPID_WORK=%QPID_WORK%
if "%EXTERNAL_CLASSPATH%" == "" set EXTERNAL_CLASSPATH=%CLASSPATH%
REM Use QPID_CLASSPATH if set
if "%QPID_CLASSPATH%" == "" goto noQpidClasspath
set CLASSPATH=%QPID_CLASSPATH%
echo Using CLASSPATH: %CLASSPATH%
goto afterQpidClasspath
:noQpidClasspath
echo Warning: Qpid classpath not set. CLASSPATH set to %QPID_HOME%\lib\qpid-all.jar
set CLASSPATH=%QPID_HOME%\lib\qpid-all.jar
:afterQpidClasspath
REM start parsing -run arguments
set QPID_ARGS=
if "%1" == "" goto endRunArgs
:runLoop
set var=%1
if "%var:~0,5%" == "-run:" goto runFound
set QPID_ARGS=%QPID_ARGS% %1
:beforeRunShift
shift
if not "%1"=="" goto runLoop
goto endRunArgs
:runFound
if "%var%" == "-run:debug" goto runDebug
if "%var%" == "-run:jpda" goto runJdpa
if "%var:~0,24%" == "-run:external-classpath-" goto runExternalClasspath
if "%var%" == "-run:print-classpath" goto runPrintCP
if "%var%" == "-run:help" goto runHelp
echo "unrecognized -run option '%var%'. For using external classpaths use -run:external-classpath-option"
goto end
:runDebug
REM USAGE: print the classpath and command before running it
set debug=true
goto beforeRunShift
:runJdpa
REM USAGE: adds debugging options to the java command, use
REM USAGE: JDPA_TRANSPORT and JPDA_ADDRESS to customize the debugging
REM USAGE: behavior and use JPDA_OPTS to override it entirely
if "%JPDA_OPTS%" == "" goto beforeRunShift
if "%JPDA_TRANSPORT%" == "" set JPDA_TRANSPORT=-dt_socket
if "%JPDA_ADDRESS%" == "" set JPDA_ADDRESS=8000
set JPDA_OPTS="-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n"
set QPID_OPTS="%QPID_OPTS% %JPDA_OPTS%"
goto beforeRunShift
:runExternalClasspath
echo Using external classpath %var%
REM USAGE: Format is -run:external-classpath-first/last/ignore/only as equals special in DOS
REM USAGE: controls how the CLASSPATH environment variable is used by
REM USAGE: this script, value can be one of ignore (the default), first,
REM USAGE: last, and only
if "%var%" == "-run:external-classpath-ignore" goto beforeRunShift
if "%var%" == "-run:external-classpath-first" goto extCPFirst
if "%var%" == "-run:external-classpath-last" goto extCPLast
if "%var%" == "-run:external-classpath-only" goto extCPOnly
echo Invalid value provided for external classpath.
goto end
:extCPFirst
set CLASSPATH=%EXTERNAL_CLASSPATH%;%CLASSPATH%
goto beforeRunShift
:extCPLast
set CLASSPATH=%CLASSPATH%;%EXTERNAL_CLASSPATH%
goto beforeRunShift
:extCPonly
set CLASSPATH=%EXTERNAL_CLASSPATH%
goto beforeRunShift
:runPrintCP
REM USAGE: print the classpath
echo %CLASSPATH%
goto beforeRunShift
:runHelp
REM USAGE: print this message
echo -------------------------------------------------------------------------------------------
echo -run:option where option can be the following.
echo debug : Prints classpath and command before running it
echo jpda : Adds remote debugging info using JPDA_OPTS. Use JPDA_TRANSPORT and JPDA_ADDRESS to
echo customize, JPDA_OPTS to override
echo external-classpath : Valid values are: ignore, first, last and only.
echo print-classpath : Prints classpath before running command
echo help : Prints this message
echo --------------------------------------------------------------------------------------------
goto end
REM end parsing -run arguments
:endRunArgs
set JAVA_VM=-server
set JAVA_MEM=-Xmx1024m
set JAVA_GC=-XX:+UseConcMarkSweepGC
rem removing the following vm arg from JAVA_GC as it is supported on ly in Java 1.6
rem -XX:+HeapDumpOnOutOfMemoryError"
REM Use QPID_JAVA_GC if set
if "%QPID_JAVA_GC%" == "" goto noQpidJavaGC
set JAVA_GC=%QPID_JAVA_GC%
echo Using QPID_JAVA_GC setting: %QPID_JAVA_GC%
goto afteQpidJavaGC
:noQPidJavaGC
echo Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC %JAVA_GC%
:afterQpidJavaGC
REM Use QPID_JAVA_MEM if set
if "%QPID_JAVA_MEM%" == "" goto noQpidJavaMem
set JAVA_MEM=%QPID_JAVA_MEM%
echo Using QPID_JAVA_MEM setting: %QPID_JAVA_MEM%
goto afterQpidJavaMem
:noQpidJavaMem
echo Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM %JAVA_MEM%
:after QpidJavaMem
rem QPID_OPTS intended to hold any -D props for use
rem user must enclose any value for QPID_OPTS in double quotes
:runCommand
set MODULE_JARS=%QPID_MODULE_JARS%
set COMMAND="%JAVA_HOME%\bin\java" %JAVA_VM% %JAVA_MEM% %JAVA_GC% %QPID_OPTS% %SYSTEM_PROPS% -cp "%CLASSPATH%;%MODULE_JARS%" org.apache.qpid.server.Main %QPID_ARGS%
if "%debug%" == "true" echo %CLASSPATH%;%LAUNCH_JAR%;%MODULE_JARS%
if "%debug%" == "true" echo %COMMAND%
%COMMAND%
:end

View file

@ -0,0 +1,21 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
exec qpid-server -run:debug "$@"

View file

@ -0,0 +1,178 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# qpid.stop Script
#
# Script checks for a given pid running DEFAULT_SEARCH and attempts to quit it
#
MAX_ATTEMPTS=2
SLEEP_DELAY=1
DEFAULT_SEARCH="PNAME=QPBRKR"
if [ -z "$QPID_STOP_SEARCH" ]; then
SEARCH=$DEFAULT_SEARCH;
else
SEARCH=$QPID_STOP_SEARCH;
fi
#
# Forcably Quit the specified PID($1)
#
forceQuit()
{
kill -9 $1
}
#
# Gracefully ask the PID($1) to quit
#
quit()
{
kill $1
}
#
# grep for the session ID ($1) and return 0 for successful quit and 1 for process alive
#
lookup_pid()
{
result=`ps -e | grep $1 | wc -l`
}
#
# grep ps for all instances of $SEARCH for the current user and collect PIDs
#
lookup_all_pids()
{
pids=`pgrep -f -U $USER $SEARCH`
result_all=`echo -n $pids | wc -w`
}
#
# check that the PID passed in is for a Qpid broker owned by this user and alive
#
validate_pid()
{
result=`pgrep -fl $SEARCH | grep $1 | wc -l`
}
#
# Show the PS output for given set of pids
#
showPids()
{
ps -o user,pid,args -p $pids
}
#
# Sleep and then check then lookup the PID($1) to ensure it has quit
#
check()
{
echo "Waiting $SLEEP_DELAY second for $1 to exit"
sleep $SLEEP_DELAY
lookup_pid $1
}
#
# Verify the PID($1) is available
#
verifyPid()
{
validate_pid $1
if [[ $[$result] == 1 ]] ; then
brokerspid=$1
else
echo "Unable to locate Qpid Broker Process with PID $1. Check PID and try again."
exit -1
fi
}
#
# Stops all Qpid brokers for current user
#
qpid_stopall_brokers()
{
for pid in $pids ; do
lookup_pid $pid;
brokerspid=$pid;
stop_broker $pid;
done
}
#
# Stops Qpid broker with brokerspid id
#
stop_broker()
{
# Attempt to quit the process MAX_ATTEMPTS Times
attempt=0
while [[ $[$result] > 0 && $[$attempt] < $[$MAX_ATTEMPTS] ]] ; do
quit $brokerspid
check $brokerspid
attempt=$[$attempt + 1]
done
# Check that it has quit
if [[ $[$result] == 0 ]] ; then
echo "Process quit"
else
attempt=0
# Now attempt to force quit the process
while [[ $[$result] > 0 && $[$attempt] < $[$MAX_ATTEMPTS] ]] ; do
forceQuit $brokerspid
check $brokerspid
attempt=$[$attempt + 1]
done
# Output final status
if [[ $[$result] > 0 && $[$attempt] == $[$MAX_ATTEMPTS] ]] ; then
echo "Stopped trying to kill process: $brokerspid"
echo "Attempted to stop $attempt times"
else
echo "Done "
fi
fi
}
#
# Main Run
#
# Check if we are killing all qpid pids or just one.
# Now uses local function qpid_stopall_brokers
if [[ $# == 0 ]] ; then
lookup_all_pids
if [[ $[$result_all] > 0 ]] ; then
echo "Killing All Qpid Brokers for user: '$USER'"
qpid_stopall_brokers
else
echo "No Qpid Brokers found running for user: " $USER
fi
exit $result
else
verifyPid $1
stop_broker
exit $result
fi

View file

@ -0,0 +1,27 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# qpid.stopall script
#
# Script attempts to stop all PROGRAMs running under the current user
# Utilises qpid.stop to perform the actual stopping
#
qpid.stop $*

View file

@ -0,0 +1,11 @@
= Qpid Java Examples =
For more information read ../README.txt.
== The Verify All Script ==
The verify_all script will run Java examples against itself and against the C++
and Python examples. The success of the script is determined by comparing its
output against what is expected.
This script uses the verify script found in qpid/cpp/examples.

View file

@ -0,0 +1,50 @@
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM Helper script to set classpath for running Qpid example classes
@REM NB: You must add the Qpid client and common jars to your CLASSPATH
@REM before running this script
@echo off
if "%QPID_HOME%" == "" GOTO ERROR_QPID_HOME
set QPIDLIB=%QPID_HOME%\lib
if "%CLASSPATH%" == "" GOTO ERROR_CLASSPATH
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\backport-util-concurrent-2.2.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\geronimo-jms_1.1_spec-1.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-collections-3.1.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-configuration-1.2.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-cli-1.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-lang-2.1.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-logging-api-1.0.4.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\commons-logging-1.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\log4j-1.2.12.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\mina-core-1.0.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\mina-filter-ssl-1.0.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\mina-java5-1.0.0.jar
set CLASSPATH=%CLASSPATH%;%QPIDLIB%\slf4j-simple-1.0.jar
GOTO END
:ERROR_CLASSPATH
Echo Please set set your CLASSPATH variable to include the Qpid client and common jars. Exiting ....
:ERROR_QPID_HOME
Echo Please set QPID_HOME variable. Exiting ....
:END

View file

@ -0,0 +1,83 @@
#!/bin/sh -xv
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Helper script to set classpath for running Qpid example classes
# NB: You must add the Qpid client and common jars to your CLASSPATH
# before running this script
cygwin=false
if [[ "$(uname -a | fgrep Cygwin)" != "" ]]; then
cygwin=true
fi
#Should have set the QPID_HOME var after install to the working dir e.g. home/qpid/qpid-1.0-incubating-M2-SNAPSHOT
if [ "$QPID_HOME" = "" ] ; then
echo "ERROR: Please set QPID_HOME variable. Exiting ...."
exit 1
else
QPIDLIB=$QPID_HOME/lib
fi
if $cygwin; then
QPIDLIB=$(cygpath -w $QPIDLIB)
fi
if [ "$CLASSPATH" = "" ] ; then
echo "ERROR: Please set set your CLASSPATH variable to include the Qpid client and common jars. Exiting ...."
exit 2
fi
#Converts paths for cygwin if req
#Some nasty concatenation to get round cygpath line limits
if $cygwin; then
SEP=";"
CLASSPATH=`cygpath -w $CLASSPATH`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/backport-util-concurrent-2.2.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/geronimo-jms_1.1_spec-1.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-collections-3.1.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-configuration-1.2.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-cli-1.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-lang-2.1.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-logging-api-1.0.4.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/commons-logging-1.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/log4j-1.2.12.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/mina-core-1.0.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/mina-filter-ssl-1.0.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/mina-java5-1.0.0.jar`
CLASSPATH=$CLASSPATH$SEP`cygpath -w $QPIDLIB/slf4j-simple-1.0.jar`
export CLASSPATH
else
CLASSPATH=$CLASSPATH:$QPIDLIB/backport-util-concurrent-2.2.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/geronimo-jms_1.1_spec-1.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-collections-3.1.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-configuration-1.2.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-cli-1.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-lang-2.1.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-logging-api-1.0.4.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/commons-logging-1.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/log4j-1.2.12.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/mina-core-1.0.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/mina-filter-ssl-1.0.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/mina-java5-1.0.0.jar
CLASSPATH=$CLASSPATH:$QPIDLIB/slf4j-simple-1.0.jar
export CLASSPATH
fi

View file

@ -0,0 +1,64 @@
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
echo $QPID_SRC_HOME
if test "'x$QPID_SRC_HOME'" == "'x'"
then
export QPID_SRC_HOME=$(cd "$(dirname $0)/../../../.."; pwd)
fi
export CPP=$QPID_SRC_HOME/cpp/examples
export PYTHON=$QPID_SRC_HOME/python/examples
export JAVA=$QPID_SRC_HOME/java/client/example/src/main/java/org/apache/qpid/example/jmsexample
export AMQP_SPEC=$QPID_SRC_HOME/specs/amqp.0-10-qpid-errata.xml
export PYTHONPATH=$QPID_SRC_HOME/python/
export LOG4J=file://$QPID_SRC_HOME/java/client/example/src/main/java/log4j.xml
trap cleanup EXIT
run_broker(){
$QPID_SRC_HOME/cpp/src/qpidd -d --no-data-dir --auth no
}
stop_broker(){
$QPID_SRC_HOME/cpp/src/qpidd -q
}
cleanup(){
if [ -e /tmp/qpidd.5672.pid ]; then
stop_broker
fi
find $CPP -name '*.out' | xargs rm -f
find $PYTHON -name '*.out' | xargs rm -f
find $JAVA -name '*.out' | xargs rm -f
}
QPID_LIBS=`find $QPID_SRC_HOME/java/build/lib -name '*.jar' | tr '\n' ":"`
export CLASSPATH=$QPID_LIBS:$CLASSPATH
verify=$QPID_SRC_HOME/cpp/examples/verify
for script in $(find $JAVA -name 'verify*' -not -path '*.svn' -not -name '*.*')
do
run_broker
$verify $script
stop_broker
done

View file

@ -0,0 +1,69 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-JNDI-Setup.bat"
set JAVACLASS=
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindConnectionFactory amqp://guest:guest@clientid/testpath?brokerlist='localhost' amq.ConnectionFactory
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindConnectionFactory amqp://guest:guest@clientid/testpath?brokerlist='vm://:1' amq.VMConnectionFactory
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindQueue amq.Queue direct://amq.direct//IBMPerfQueue1
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic1 topic://amq.topic/IBMPerfTopic1/
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic2 topic://amq.topic/IBMPerfTopic2/
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic3 topic://amq.topic/IBMPerfTopic3/
:end
pause

View file

@ -0,0 +1,27 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindConnectionFactory amqp://guest:guest@clientid/testpath?brokerlist=\'tcp://localhost\' amq.ConnectionFactory
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindConnectionFactory amqp://guest:guest@clientid/testpath?brokerlist=\'vm://:1\' amq.VMConnectionFactory
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindQueue amq.Queue direct://amq.direct//IBMPerfQueue1
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic1 topic://amq.topic/IBMPerfTopic1/
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic2 topic://amq.topic/IBMPerfTopic2/
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic3 topic://amq.topic/IBMPerfTopic3/
qpid-run org.apache.qpid.IBMPerfTest.JNDIBindTopic amq.Topic4 topic://amq.topic/IBMPerfTopic4/

View file

@ -0,0 +1,62 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-Publisher.bat"
set JAVACLASS=JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:/C:/temp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Topic -db 1 -dx 4 -tc jms.r11.Publisher -nt 4 %*
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" %JAVACLASS%
:end
pause

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
export MSGSIZE=100
qpid-run JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:///tmp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Topic -db 1 -dx 4 -tc jms.r11.Publisher -nt 4 $*

View file

@ -0,0 +1,62 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-PutGet.bat"
set JAVACLASS=JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:/C:/temp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.PutGet -nt 6 %*
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" %JAVACLASS%
:end
pause

View file

@ -0,0 +1,21 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
qpid-run JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:///tmp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.PutGet -nt 6 $*

View file

@ -0,0 +1,19 @@
The IBM JMS Performance Harness scripts have take the following additional parameters
-tx : Enable transactions
-pp : Enable persistent messaging
-ms 1000 : Set message size (default 1000 bytes)
-cc 1 : Number of messages to per commit (default 1) Only applies to Sender/Subscriber
The IBM JMS Performance Harness will need to be downloaded and the library added to client/test/lib.
The Library can be found here:
http://www.alphaworks.ibm.com/tech/perfharness
Before running the required test the IBM JNDI Setup script should be run.
This will create a filesystem based JNDI Context located at:
System.properties{java.io.tmpdir}/IBMPerfTestsJNDI/

View file

@ -0,0 +1,62 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-Receiver.bat"
set JAVACLASS=JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:/C:/temp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.Receiver %*
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" %JAVACLASS%
:end
pause

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
export MSGSIZE=100
qpid-run JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:///tmp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.Receiver $*

View file

@ -0,0 +1,62 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-Sender.bat"
set JAVACLASS=JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:/C:/temp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.Sender -ms $MSGSIZE -mg 1000000 %*
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" %JAVACLASS%
:end
pause

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
export MSGSIZE=100
qpid-run JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:///tmp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Queue -tc jms.r11.Sender -ms $MSGSIZE -mg 1000000 $*

View file

@ -0,0 +1,62 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
REM Script to run the Qpid Java Broker
set CMD="IBM-Subscriber.bat"
set JAVACLASS=JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:/C:/temp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Topic -db 1 -dx 4 -tc jms.r11.Subscriber -nt 4 %*
rem Guess QPID_HOME if not defined
set CURRENT_DIR=%cd%
if not "%QPID_HOME%" == "" goto gotHome
set QPID_HOME=%CURRENT_DIR%
echo %QPID_HOME%
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
cd ..
set QPID_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%QPID_HOME%\bin\%CMD%" goto okHome
echo The QPID_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto exit
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program.
goto exit
:okJavaHome
set CLIENT_TEST_CLASSES=%QPID_HOME%\lib\client-test-launch.jar
echo on
"%JAVA_HOME%\bin\java" -server -Xmx1024m -DQPID_HOME="%QPID_HOME%" -cp "%CLIENT_TEST_CLASSES%" %JAVACLASS%
:end
pause

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
export MSGSIZE=100
qpid-run JMSPerfHarness -pc JNDI -ii com.sun.jndi.fscontext.RefFSContextFactory -iu file:///tmp/IBMPerfTestsJNDI/ -cf amq.ConnectionFactory -d amq.Topic -db 1 -dx 4 -tc jms.r11.Subscriber -nt 4 $*

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.headers.Listener $*

View file

@ -0,0 +1,25 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
for i; do
./headersListener.sh -host 10.0.0.1 -port 5672 >$i.out 2>$i.err &
echo $! > $i.pid
done;

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.headers.Publisher $*

View file

@ -0,0 +1,30 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# args:
# <number of processes to start>
# <name of run>
# <command ro run>
for i in `seq 1 $1`; do
$3 >$2.$i.out 2>>$2.err &
echo $! > $2.$i.pid
done;

View file

@ -0,0 +1,24 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
PROFILE=$1
shift
# XXX -Xms1024m -XX:NewSize=300m
. qpid-run org.apache.qpid.requestreply1.ServiceProvidingClient $1 guest guest /test serviceQ

View file

@ -0,0 +1,27 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
PROFILE=$1
shift
thehosts=$1
shift
echo $thehosts
# XXX -Xms1024m -XX:NewSize=300m
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.requestreply1.ServiceRequestingClient $thehosts guest guest /test serviceQ "$@"

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
. qpid-run org.apache.qpid.requestreply1.TestService 192.168.55.63 5672 foo x x

View file

@ -0,0 +1,23 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# XXX -Xmx512m -Xms512m -XX:NewSize=150m
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.topic.Listener $*

View file

@ -0,0 +1,22 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# XXX -Xmx512m -Xms512m -XX:NewSize=150m
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.topic.Publisher $*

View file

@ -0,0 +1,265 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Test if we're running on cygwin.
cygwin=false
if [[ "$(uname -a | fgrep Cygwin)" != "" ]]; then
cygwin=true
fi
die() {
if [[ $1 = -usage ]]; then
shift
usage=true
else
usage=false
fi
echo "$@"
$usage && echo
$usage && usage
exit 1
}
OFF=0
WARN=1
INFO=2
if [ -z "$QPID_RUN_LOG" ]; then
QPID_RUN_LOG=$OFF
fi
log() {
if [ "$1" -le "$QPID_RUN_LOG" ]; then
shift
echo "$@"
fi
}
if [ -z $AMQJ_LOGGING_LEVEL ]; then
export AMQJ_LOGGING_LEVEL=info
fi
#Set to help us get round the manifold problems of ps/pgrep on various
#platforms which gather up to prevent qpid_stop from working .....
if [ -z "$QPID_PNAME" ]; then
export QPID_PNAME=" -DPNAME=QPBRKR"
fi
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
export PATH=${PATH}:${QPID_HOME}/bin
fi
if [ -z "$QPID_WORK" ]; then
log $INFO Setting QPID_WORK to $HOME as default
QPID_WORK=$HOME
fi
if [ -z "$JAVA" ]; then
JAVA=java
fi
if $cygwin; then
QPID_HOME=$(cygpath -w $QPID_HOME)
QPID_WORK=$(cygpath -w $QPID_WORK)
fi
#Set the default system properties that we'll use now that they have
#all been initialised
SYSTEM_PROPS="-Damqj.logging.level=$AMQJ_LOGGING_LEVEL -DQPID_HOME=$QPID_HOME -DQPID_WORK=$QPID_WORK"
#If logprefix or logsuffix set to use PID make that happen
#Otherwise just pass the value through for these props
#Using X character to avoid probs with empty strings
if [ -n "$QPID_LOG_PREFIX" ]; then
if [ "X$QPID_LOG_PREFIX" = "XPID" ]; then
log $INFO Using pid in qpid log name prefix
LOG_PREFIX=" -Dlogprefix=$$"
else
log $INFO Using qpid logprefix property
LOG_PREFIX=" -Dlogprefix=$QPID_LOG_PREFIX"
fi
SYSTEM_PROPS="${SYSTEM_PROPS} ${LOG_PREFIX}"
fi
if [ -n "$QPID_LOG_SUFFIX" ]; then
if [ "X$QPID_LOG_SUFFIX" = "XPID" ]; then
log $INFO Using pid in qpid log name suffix
LOG_SUFFIX=" -Dlogsuffix=$$"
else
log $INFO Using qpig logsuffix property
LOG_SUFFIX=" -Dlogsuffix=$QPID_LOG_SUFFIX"
fi
SYSTEM_PROPS="${SYSTEM_PROPS} ${LOG_SUFFIX}"
fi
log $INFO System Properties set to $SYSTEM_PROPS
log $INFO QPID_OPTS set to $QPID_OPTS
program=$(basename $0)
sourced=${BASH_SOURCE[0]}
if [[ -z ${sourced:-''} ]]; then
sourced=$(which qpid-run) || ${QPID_HOME}/bin/qpid-run
fi
usage() {
echo Usage: $program ... "[-run:<option>]" ...
echo
echo Options:
egrep -B 1 "^\s*#USAGE: " ${sourced} |\
sed "s/#USAGE:/ /" |\
sed "s/-run:\(.*\))/-run:\1/" |\
sed "s/-run:\(.*\)=\*/-run:\1=<value>/" |\
sed "s/^--$//"
}
export EXTERNAL_CLASSPATH=$CLASSPATH
unset CLASSPATH
#Use QPID_CLASSPATH if set
if [ -n "$QPID_CLASSPATH" ]; then
export CLASSPATH=$QPID_CLASSPATH
log $INFO "Using QPID_CLASSPATH" $QPID_CLASSPATH
else
log $WARN "Warning: Qpid classpath not set. CLASSPATH must include qpid jars."
fi
#Use QPID_JAVA_GC if set
if [ -n "$QPID_JAVA_GC" ]; then
export JAVA_GC=$QPID_JAVA_GC
log $INFO "Using QPID_JAVA_GC setting" $QPID_JAVA_GC
else
log $INFO "Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC" $JAVA_GC
fi
#Use QPID_JAVA_MEM if set
if [ -n "$QPID_JAVA_MEM" ]; then
export JAVA_MEM=$QPID_JAVA_MEM
log $INFO "Using QPID_JAVA_MEM setting" $QPID_JAVA_MEM
else
log $INFO "Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM" $JAVA_MEM
fi
declare -a RUN_ARGS JAVA_ARGS
for arg in "$@"; do
if [[ $arg == -run:* ]]; then
RUN_ARGS[${#RUN_ARGS[@]}]="$arg"
else
JAVA_ARGS[${#JAVA_ARGS[@]}]="$arg"
fi
done
# this defines the default behavior, it may be modified during option
# processing below
DISPATCH() {
if $debug; then
echo "CLASSPATH=${CLASSPATH}"
echo "${COMMAND[@]}"
fi
exec "${COMMAND[@]}"
}
exclusive() {
if [ -z "$PREVIOUS_ARGS" ]; then
PREVIOUS_ARGS=$1
else
PREVIOUS_ARGS="${PREVIOUS_ARGS}, $1"
DISPATCH() {
die -usage "you must choose one of: $PREVIOUS_ARGS"
}
fi
}
debug=false
for arg in "${RUN_ARGS[@]}"; do
case $arg in
-run:debug)
#USAGE: print the classpath and command before running it
debug=true
;;
-run:jpda)
#USAGE: adds debugging options to the java command, use
#USAGE: JPDA_TRANSPORT and JPDA_ADDRESS to customize the debugging
#USAGE: behavior and use JPDA_OPTS to override it entirely
if [ -z "$JPDA_OPTS" ]; then
JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT:-dt_socket},address=${JPDA_ADDRESS:-8000},server=y,suspend=n"
fi
QPID_OPTS="${QPID_OPTS} ${JPDA_OPTS}"
;;
-run:external-classpath=*)
#USAGE: controls how the CLASSPATH environment variable is used by
#USAGE: this script, value can be one of ignore (the default), first,
#USAGE: last, and only
case $arg in
*=ignore)
# do nothing
;;
*=first)
CLASSPATH=$EXTERNAL_CLASSPATH:$CLASSPATH
;;
*=last)
CLASSPATH=$CLASSPATH:$EXTERNAL_CLASSPATH
;;
*=only)
CLASSPATH=$EXTERNAL_CLASSPATH
;;
*)
die -usage $(echo $arg | sed "s/=/: invalid value '/")\'
;;
esac
;;
-run:print-classpath)
#USAGE: print the classpath
DISPATCH() {
echo $CLASSPATH
}
exclusive $arg
;;
-run:print-command)
#USAGE: print the command
DISPATCH() {
echo "${COMMAND[@]}"
}
exclusive $arg
;;
-run:help)
#USAGE: print this message
DISPATCH() {
usage
}
exclusive $arg
;;
*)
die -usage "unrecognized -run option '$arg'"
;;
esac
done
if $cygwin; then
CLASSPATH=$(cygpath -w -p $CLASSPATH)
JAVA=$(cygpath -u $JAVA)
fi
COMMAND=($JAVA $JAVA_VM $QPID_PNAME $JAVA_GC $JAVA_MEM $SYSTEM_PROPS $JAVA_OPTS $QPID_OPTS "${JAVA_ARGS[@]}")
DISPATCH

View file

@ -0,0 +1,180 @@
#!/usr/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import glob, os, subprocess
from subprocess import Popen
from optparse import OptionParser
interop_cases = ["InteropTestCase1DummyRun", "InteropTestCase2BasicP2P", "InteropTestCase3BasicPubSub", "InteropTestCase4P2PMessageSize", "InteropTestCase5PubSubMessageSize"]
interop_command = "java -cp %s org.apache.qpid.test.framework.distributedtesting.Coordinator --xml -e interop -o . -n interop org.apache.qpid.interop.testcases.%s"
# TODO: read this from the ant properties file
clientlibs = ["qpid-integrationtests-M4.jar",
"qpid-junit-toolkit-M4.jar",
"junit-3.8.1.jar",
"qpid-systests-M4.jar",
"qpid-junit-toolkit-M4.jar",
"geronimo-jms_1.1_spec-1.0.jar",
"log4j-1.2.12.jar"]
def main():
parser = OptionParser()
parser.add_option("-t", "--testlib", dest="testlib", action="store",
type="string",
help="The directory containing the test classes to run")
parser.add_option("-b", "--brokers", dest="brokers", action="store",
type="string",
help="The directory containing the unpacked brokers to test")
parser.add_option("-j", "--java", dest="java", action="store",
type="string",
help="The directory containing the java client to test")
parser.add_option("-d", "--dotnet", dest="dotnet", action="store",
type="string",
help="The directory containing the .Net client to test")
parser.add_option("-c", "--cpp", dest="cpp", action="store",
type="string",
help="The directory containing the C++ client to test")
(options, args) = parser.parse_args()
# check available brokers
if (options.brokers == None or
not os.path.exists(options.brokers) or
not os.path.isdir(options.brokers)):
parser.error("Broker directory must be specified and must exist")
# check available clients
if (options.java == None or
not os.path.exists(options.java) or
not os.path.isdir(options.java)):
parser.error("Java client directory must be specified and must exist")
# check available tests
if (options.testlib == None or
not os.path.exists(options.testlib) or
not os.path.isdir(options.testlib)):
parser.error("Test directory must be specified and must exist")
# check dotnet test client
if (options.dotnet == None or
not os.path.exists(options.dotnet) or
not os.path.exists(options.dotnet+"/TestClient.exe")):
parser.error(".Net test directory must be specified and must contain TestClient.exe")
# check cpp test client
if (options.cpp == None or
not os.path.exists(options.cpp) or
not os.path.exists(options.cpp+"/src/tests/interop_runner")):
parser.error("C++ test directory must be specified and must contain test client")
# Get list of available broker and client versions
brokers = glob.glob(options.brokers+"/qpid-[0-9].[0-9].[0-9].[0-9]")
java_clients = glob.glob(options.java+"/qpid-[0-9].[0-9].[0-9].[0-9]*")
if (not len(brokers) > 0):
parser.error("Broker directory did not contain any brokers!")
if (not len(java_clients) > 0):
parser.error("Broker directory did not contain any brokers!")
for broker in brokers:
for client in java_clients:
test(options.testlib, broker, client, options.dotnet,
options.cpp)
def start_dotnet(dotnetpath):
return Popen(["%s/TestClient.exe" % os.path.abspath(dotnetpath),
"-bamqp://guest:guest@clientid/?brokerlist=\'tcp://localhost:5672\'"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
def start_java(javapath):
# Setup classpath
classpath = ""
for lib in clientlibs:
classpath = classpath + testlibdir+"/"+lib+";"
classpath = classpath + javapath+"/lib/qpid-all.jar"
# Add qpid common since the tests need that, classpath hatefulness
classpath = classpath + ";"+testlibdir+"/qpid-common-M4.jar"
return Popen(["java", "-cp","\""+classpath+"\"",
"org.apache.qpid.test.framework.distributedtesting.TestClient"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
def start_cpp(cpppath):
return Popen([cpppath+"tests/interop_runner"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
def run_tests():
for testcase in interop_cases:
cmd = " ".join(["java", "-cp","\""+classpath+"\"", "org.apache.qpid.test.framework.distributedtesting.Coordinator",
"--xml", "-e", "interop", "-o", ".", "-n", "interop", ("org.apache.qpid.interop.testcases.%s" % testcase)])
fd = os.popen(cmd, "r")
output = fd.read()
fd.close()
def test(testlibdir, brokerpath, javapath, dotnetpath, cpppath):
print ("Testing broker in %s\nclient in %s" % (brokerpath, javapath))
print ("Logging too %s" % ("/tmp/qpid-interop-tests/%s-%s" %
(os.path.basename(brokerpath), os.path.basename(javapath))))
os.environ["QPID_HOME"] = brokerpath
os.environ["QPID_WORK"] = ("/tmp/qpid-interop-tests/%s-%s" %
(os.path.basename(brokerpath), os.path.basename(javapath)))
brokerp, javacp, dotnetp, cppp, coordinatorp = (None, None, None, None, None)
try:
# Start broker
brokerp = Popen(brokerpath+"/bin/qpid-server",
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
print ("Started broker, pid %s" % brokerp.pid)
cppp = start_cpp(cpppath)
print ("Started C++ client, pid %s" % cppp.pid)
dotnetp = start_dotnet(dotnetpath)
print ("Started .Net client, pid %s" % dotnetp.pid)
javacp = start_java(javapath)
print ("Started client, pid %s" % javacp.pid)
run_tests()
finally:
# Shutdown broker and clients
if javacp != None:
os.kill(javacp.pid, 9)
if dotnetp != None:
os.kill(dotnetp.pid, 9)
if coordinatorp != None:
os.kill(coordinatorp.pid, 9)
if brokerp != None:
os.kill(brokerp.pid, 9)
# Start coordinator
if __name__ == "__main__":
main()

View file

@ -0,0 +1,78 @@
@echo off
@rem Licensed to the Apache Software Foundation (ASF) under one
@rem or more contributor license agreements. See the NOTICE file
@rem distributed with this work for additional information
@rem regarding copyright ownership. The ASF licenses this file
@rem to you under the Apache License, Version 2.0 (the
@rem "License"); you may not use this file except in compliance
@rem with the License. You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing,
@rem software distributed under the License is distributed on an
@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@rem KIND, either express or implied. See the License for the
@rem specific language governing permissions and limitations
@rem under the License.
@rem *************************************************************************
@rem This script is used to initialize environment to start QMan JMX Adapter.
@rem It uses several environment variables described below.
@rem You can edit this file according to your environment or (reccommended) set their
@rem values outside this script.
@rem
@rem It sets (or retrieve from the environment if defined) the following variables:
@rem
@rem QMAN_HOME - The home directory of your QMan installation.
@rem JAVA_HOME - Location of the version of Java runtime used to start QMan.
@rem QMAN_CONFIG_FILE - Location of the QMan configuration file.
@rem **************************************************************************
cls
:CHECK JVM
set JAVA=%JAVA_HOME%\bin\java
set JAVA_OPTS=-Xms128m -Xmx512m
if not "%JAVA_HOME%" == "" goto CONFIGURE AND START
set JAVA=java
echo.
echo WARNING : JAVA_HOME is not set so unexpected results may occur.
echo Please set JAVA_HOME to the directory of your local JDK / JRE to avoid this message.
:CONFIGURE AND START
if "%QMAN_HOME%" == "" SET QMAN_HOME=..
if "%QMAN_CONFIG_FILE%" == "" SET QMAN_CONFIG_FILE=%QMAN_HOME%\etc\qman-config.xml
SET QMAN_LIBS=%QMAN_HOME%\lib
SET QMAN_CLASSPATH=%QMAN_HOME%\etc
setlocal ENABLEDELAYEDEXPANSION
FOR /R %QMAN_LIBS% %%G IN (*.jar) DO set QMAN_CLASSPATH=!QMAN_CLASSPATH!;%%G
:START
echo ===============================================================================
echo.
echo QMan JMX Bridge Bootstrap Environment
echo --------------------------------------------------
echo.
echo QMan HOME : %QMAN_HOME%
echo.
echo Java executable : %JAVA%
echo.
echo Java Opts : %JAVA_OPTS%
echo.
echo Configuration file : %QMAN_CONFIG_FILE%
echo.
echo Bootstrap classpath : %QMAN_CLASSPATH%
echo.
echo ===============================================================================
echo.
"%JAVA%" %JAVA_OPTS% -Dcom.sun.management.jmxremote -Dqman-config=%QMAN_CONFIG_FILE% -classpath "%QMAN_CLASSPATH%" org.apache.qpid.management.domain.services.QMan

View file

@ -0,0 +1,76 @@
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# *************************************************************************
# This script is used to initialize environment to start QMan JMX Adapter.
# It uses several environment variables described below.
# You can edit this file according to your environment or (reccommended) set their
# values outside this script.
#
# It sets (or retrieve from the environment if defined) the following variables:
#
# QMAN_HOME - The home directory of your QMan installation.
# JAVA_HOME - Location of the version of Java runtime used to start QMan.
# QMAN_CONFIG_FILE - Location of the QMan configuration file.
# **************************************************************************
clear
JAVA=$JAVA_HOME/bin/java
JAVA_OPTS="-Xms128m -Xmx512m"
if [ "$JAVA_HOME" = "" ] ; then
echo "JAVA_HOME is not set. Unexpected results may occur."
echo "Set JAVA_HOME to the directory of your local JDK to avoid this message."
JAVA=java
fi
if [ "$QMAN_HOME" = "" ] ; then
QMAN_HOME=..
fi
if [ "$QMAN_CONFIG_FILE" = "" ] ; then
QMAN_CONFIG_FILE=$QMAN_HOME/etc/qman-config.xml
fi
if [ "$QMAN_LIBS" = "" ] ; then
QMAN_LIBS=$QMAN_HOME/lib
fi
QMAN_CLASSPATH=`find $QMAN_LIBS | tr '\n' ":"`
QMAN_CLASSPATH=$QMAN_HOME/etc:$QMAN_CLASSPATH
echo "==============================================================================="
echo ""
echo "QMan JMX Bridge Bootstrap Environment"
echo "--------------------------------------------------"
echo ""
echo "QMan HOME : $QMAN_HOME"
echo ""
echo "Java executable : $JAVA"
echo ""
echo "Java Opts : $JAVA_OPTS"
echo ""
echo "Configuration file : $QMAN_CONFIG_FILE"
echo ""
echo "Bootstrap classpath : $QMAN_CLASSPATH"
echo ""
echo "==============================================================================="
echo ""
"$JAVA" $JAVA_OPTS -cp $QMAN_CLASSPATH -Dcom.sun.management.jmxremote -Dqman-config=$QMAN_CONFIG_FILE org.apache.qpid.management.domain.services.QMan

View file

@ -0,0 +1,88 @@
@echo off
@rem Licensed to the Apache Software Foundation (ASF) under one
@rem or more contributor license agreements. See the NOTICE file
@rem distributed with this work for additional information
@rem regarding copyright ownership. The ASF licenses this file
@rem to you under the Apache License, Version 2.0 (the
@rem "License"); you may not use this file except in compliance
@rem with the License. You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing,
@rem software distributed under the License is distributed on an
@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@rem KIND, either express or implied. See the License for the
@rem specific language governing permissions and limitations
@rem under the License.
@rem *************************************************************************
@rem This script is used to initialize environment to start QMan WS-DM Adapter.
@rem It uses several environment variables described below.
@rem You can edit this file according to your environment or (reccommended) set their
@rem values outside this script.
@rem
@rem It sets (or retrieve from the environment if defined) the following variables:
@rem
@rem QMAN_HOME - The home directory of your QMan installation.
@rem JAVA_HOME - Location of the version of Java runtime used to start QMan.
@rem QMAN_WSDM_ADAPTER_PORT - The TCP port that QMan will use to listen for incoming connections.
@rem QMAN_WSDM_ADAPTER_HOST - The IP address or DNS name QMan will use to listen for incoming connections
@rem QMAN_CONFIG_FILE - Location of the QMan configuration file.
@rem **************************************************************************
set JAVA=%JAVA_HOME%\bin\java
set JAVA_OPTS=-Xms128m -Xmx512m
SET CLASSPATH=
if not "%JAVA_HOME%" == "" goto CONFIGURE AND START
set JAVA=java
echo JAVA_HOME is not set. Unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
:CONFIGURE AND START
if "%QMAN_HOME%" == "" SET QMAN_HOME=..
if "%QMAN_WSDM_ADAPTER_PORT%" == "" SET QMAN_WSDM_ADAPTER_PORT=8080
if "%QMAN_WSDM_ADAPTER_HOST%" == "" SET QMAN_WSDM_ADAPTER_HOST=%COMPUTERNAME%
if "%QMAN_CONFIG_FILE%" == "" SET QMAN_CONFIG_FILE=%QMAN_HOME%\etc\qman-config.xml
SET ADMIN_PORT=8079
SET ADMIN_KEY=gazzax
SET QMAN_LIBS=%QMAN_HOME%\lib
SET JETTY_CONFIG_FILE=%QMAN_HOME%\etc\jetty.xml
SET CLASSPATH=%QMAN_HOME%\etc
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\start.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\jetty-6.1.14.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\jetty-util-6.1.14.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\geronimo-servlet_2.5_spec-1.2.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\slf4j-api-1.4.0.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\slf4j-log4j12-1.4.0.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\log4j-1.2.12.jar
echo ===============================================================================
echo.
echo QMan WS-DM Bridge Bootstrap Environment
echo ------------------------------------------------------
echo.
echo QMan HOME: %QMAN_HOME%
echo.
echo Java executable : %JAVA%
echo.
echo QMan configuration file : %QMAN_CONFIG_FILE%
echo.
echo Web Server configuration file : %JETTY_CONFIG_FILE%
echo.
echo Web Server HTTP port : %QMAN_WSDM_ADAPTER_PORT%
echo.
echo Web Server Admin port : %ADMIN_PORT%
echo.
echo Bootstrap classpath : %CLASSPATH%
echo.
echo ===============================================================================
echo.
%JAVA% -cp %CLASSPATH% -DQMAN_HOME=%QMAN_HOME% -Djetty.home=%QMAN_HOME% -Dqman.host=%QMAN_WSDM_ADAPTER_HOST% -Dqman.port=%QMAN_WSDM_ADAPTER_PORT% -DSTOP.PORT=%ADMIN_PORT% -DSTOP.KEY=%ADMIN_KEY% -Dqman-config=%QMAN_CONFIG_FILE% org.mortbay.start.Main %JETTY_CONFIG_FILE%

View file

@ -0,0 +1,89 @@
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# *************************************************************************
# This script is used to initialize environment to start QMan WS-DM Adapter.
# It uses several environment variables described below.
# You can edit this file according to your environment or (reccommended) set their
# values outside this script.
#
# It sets (or retrieve from the environment if defined) the following variables:
#
# QMAN_HOME - The home directory of your QMan installation.
# JAVA_HOME - Location of the version of Java runtime used to start QMan.
# QMAN_WSDM_ADAPTER_PORT - The TCP port that QMan will use to listen for incoming connections.
# QMAN_WSDM_ADAPTER_HOST - The IP address or DNS name QMan will use to listen for incoming connections
# QMAN_CONFIG_FILE - Location of the QMan configuration file.
# **************************************************************************
JAVA=$JAVA_HOME/bin/java
JAVA_OPTS="-Xms128m -Xmx512m"
if [ "$JAVA_HOME" = "" ] ; then
echo "JAVA_HOME is not set. Unexpected results may occur."
echo "Set JAVA_HOME to the directory of your local JDK to avoid this message."
JAVA=java
fi
if [ "$QMAN_HOME" = "" ] ; then
QMAN_HOME=..
fi
if [ "$QMAN_WSDM_ADAPTER_PORT" = "" ] ; then
QMAN_WSDM_ADAPTER_PORT=8080
fi
if [ "$QMAN_WSDM_ADAPTER_HOST" = "" ] ; then
QMAN_WSDM_ADAPTER_HOST=$HOSTNAME
fi
if [ "$QMAN_CONFIG_FILE" = "" ] ; then
QMAN_CONFIG_FILE=$QMAN_HOME/etc/qman-config.xml
fi
ADMIN_PORT=8079
ADMIN_KEY=gazzax
QMAN_LIBS=$QMAN_HOME/lib
JETTY_CONFIG_FILE=$QMAN_HOME/etc/jetty.xml
QMAN_CLASSPATH=$QMAN_HOME/etc:$QMAN_LIBS/start.jar:$QMAN_LIBS/jetty-6.1.14.jar:$QMAN_LIBS/jetty-util-6.1.14.jar:$QMAN_LIBS/geronimo-servlet_2.5_spec-1.2.jar:$QMAN_LIBS/slf4j-api-1.4.0.jar:$QMAN_LIBS/slf4j-log4j12-1.4.0.jar:$QMAN_LIBS/log4j-1.2.12.jar
echo "==============================================================================="
echo""
echo "QMan WS-DM Bridge Bootstrap Environment"
echo "------------------------------------------------------"
echo""
echo "QMan HOME: $QMAN_HOME"
echo""
echo "Java executable : $JAVA"
echo""
echo "Java Opts : $JAVA_OPTS"
echo""
echo "Configuration file : $QMAN_CONFIG_FILE"
echo""
echo "Web Server Configuration File : $JETTY_CONFIG_FILE"
echo""
echo "Web Server HTTP port : $QMAN_WSDM_ADAPTER_PORT"
echo""
echo "Web Server HTTP host : $QMAN_WSDM_ADAPTER_HOST"
echo""
echo "Web Server Admin port : $ADMIN_PORT"
echo""
echo "Bootstrap classpath : $QMAN_CLASSPATH"
echo""
echo "==============================================================================="
echo""
"$JAVA" $JAVA_OPTS -cp $QMAN_CLASSPATH -DQMAN_HOME=$QMAN_HOME -Djetty.home=$QMAN_HOME -Dqman.host=$QMAN_WSDM_ADAPTER_HOST -Dqman.port=$QMAN_WSDM_ADAPTER_PORT -DSTOP.PORT=$ADMIN_PORT -DSTOP.KEY=$ADMIN_KEY -Dqman-config=$QMAN_CONFIG_FILE org.mortbay.start.Main $JETTY_CONFIG_FILE

View file

@ -0,0 +1,37 @@
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one
rem or more contributor license agreements. See the NOTICE file
rem distributed with this work for additional information
rem regarding copyright ownership. The ASF licenses this file
rem to you under the Apache License, Version 2.0 (the
rem "License"); you may not use this file except in compliance
rem with the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing,
rem software distributed under the License is distributed on an
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
rem KIND, either express or implied. See the License for the
rem specific language governing permissions and limitations
rem under the License.
set JAVA=%JAVA_HOME%\bin\java
if not "%JAVA_HOME%" == "" goto CONFIGURE AND START
set JAVA=java
echo JAVA_HOME is not set. Unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
:CONFIGURE AND START
if "%QMAN_HOME%" == "" SET QMAN_HOME=..
SET ADMIN_PORT=8079
SET ADMIN_KEY=gazzax
"%JAVA%" -DSTOP.PORT=%ADMIN_PORT% -DSTOP.KEY=%ADMIN_KEY% -jar %QMAN_HOME%\lib\start.jar --stop
echo QMan WS-DM Adapter shut down successfully.

View file

@ -0,0 +1,38 @@
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
JAVA=$JAVA_HOME/bin/java
if [ "$JAVA_HOME" = "" ] ; then
echo "JAVA_HOME is not set. Unexpected results may occur."
echo "Set JAVA_HOME to the directory of your local JDK to avoid this message."
JAVA=java
fi
if [ "$QMAN_HOME" = "" ] ; then
QMAN_HOME=..
fi
ADMIN_PORT=8079
ADMIN_KEY=gazzax
"$JAVA" -DSTOP.PORT=$ADMIN_PORT -DSTOP.KEY=$ADMIN_KEY -jar $QMAN_HOME/lib/start.jar --stop
echo "QMan WS-DM Adapter shut down successfully."

View file

@ -0,0 +1,35 @@
#!/bin/bash
#
# License to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
export PATH=${PATH}:${QPID_HOME}/bin
fi
# Set classpath to include Qpid jar with all required jars in manifest
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run org.apache.qpid.CommandLineInterpreter "$@"

View file

@ -0,0 +1,28 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/jline-0.9.94.jar
set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/junit-4.4.jar
set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/qpid-cli-1.0.jar
set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/qpid-management-common-M4.jar
set CLASSPATH=%CLASSPATH%;%QPID_HOME%/management/tools/qpid-cli/main/classes/
java -classpath %CLASSPATH% org.apache.qpid.CommandLineInterpreter %1

View file

@ -0,0 +1,221 @@
#!/bin/bash
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
#
# This script starts a broker and then starts additional logging as required.
# *.pid files are generated in the LOG_DIR for later use by the stop-monitored-broker
# script.
#
# Currently this process starts:
# - The broker with additional QPID_OPTS for gc logging
# - Top to monitoring the CPU usage
#
# Additional processes can be started and as long as they write a PID into LOG_DIR/*.pid
# it will be shutdown with the stop script
#
#
# Output the broker log file to aid problem diagnosis
# then exit.
#
brokerFailExit()
{
echo "Broker failed to start up."
cat $BROKER_LOG
exit 1
}
showUsageExit()
{
echo "Usage $0 <Path to Test Broker> <LOG DIR> <CPU Monitor Rate (s)> [Additional options to
pass to Qpid broker startup]"
exit 1
}
#
# Perform 3 attempts to get the broker PID via ps and grep
# if unable the output broker log and exit
#
getBrokerPID()
{
attempts=3
ready=0
while [ $ready == 0 ] ; do
PID=`ps auxwww| grep java | grep Xloggc | awk '{print $2}'`
if [ ! $PID == 0 ] ; then
ready=1
else
attempts=$[ $attempts - 1 ]
if [ $attempts == 0 ] ; then
brokerFailExit
fi
sleep 1
fi
done
}
#
# Additional Check to ensure that the broker process
# has correctly written 'Ready' to the log file.
#
checkBrokerStarted()
{
attempts=3
ready=0
while [ $ready == 0 ] ; do
grep Ready $BROKER_LOG > /dev/null
if [ $? == 0 ] ; then
ready=1
else
attempts=$[ $attempts - 1 ]
if [ $attempts == 0 ] ; then
brokerFailExit
fi
echo "Broker not ready sleeping 1s"
sleep 1
fi
done
}
#
# Command Line setup
#
# Ensure we have minimum of three arguments
if [[ $# > 2 ]] ; then
BROKER_VERSION=$1
LOG_DIR=$2
CPU_MONITOR_RATE=$3
# Remove these arguments from the $@ variable
shift
shift
shift
else
# If we have no arguments then use these as the default
CPU_MONITOR_RATE=0.5
LOG_DIR=$QPID_WORK/logging
BROKER_VERSION=qpid-0.5
fi
#
# Check the specified broker is reachable
# it it is not the log and show usage
#
if [ ! -d $BROKER_VERSION ] ; then
echo "Broker not available at: $BROKER_VERSION"
showUsageExit
fi
#
# Check to see if we have an absolute path for logging
#
logStart=`echo $LOG_DIR|cut -c 1`
#
# If we don't have an absolute path then add the current
# directory path to the start.
#
if [[ $logStart != '/' ]] ; then
echo -n "$LOG_DIR is not absolute, using "
LOG_DIR=`pwd`/$LOG_DIR
echo $LOG_DIR
fi
#
# Validate that the directory does not exist
# - this is so we can guarrantee a clean run.
# If it does exit then log and show usage
#
if [ -d $LOG_DIR ] ; then
echo "Log directory already exists : $LOG_DIR"
showUsageExit
fi
#
# Create the logging directory
#
mkdir -p $LOG_DIR
#
# Variable for broker log
#
BROKER_LOG=$LOG_DIR/broker.log
# Variable to hold broker PID
PID=0
export QPID_OPTS="-Xloggc:$LOG_DIR/gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps"
#
# Start Qpid Broker
#
echo "Starting Broker : $BROKER_VERSION"
pushd $BROKER_VERSION/bin > /dev/null
./qpid-server $@ 2> $BROKER_LOG >&2 &
popd > /dev/null
# Wait and check startup was ok
echo "Waiting for broker startup"
getBrokerPID
checkBrokerStarted
echo $PID > $LOG_DIR/broker.pid
#
# Start CPU Monitoring via TOP
#
echo "Starting CPU Monitor at RATE:$CPU_MONITOR_RATE on $SERVER1"
pushd $LOG_DIR > /dev/null
echo $CPU_MONITOR_RATE > top.rate
top -d $CPU_MONITOR_RATE -S -c -p $PID -b > broker_cpu.log &
#
# Get top pid using $!
#
echo $! > $LOG_DIR/top.pid
popd > /dev/null
#
# Generate Stat files
#
echo "Generating Stat data"
stat $BROKER_LOG > $BROKER_LOG.stat
stat $LOG_DIR/broker_cpu.log > $LOG_DIR/broker_cpu.log.stat
stat $LOG_DIR/gc.log > $LOG_DIR/gc.log.stat

View file

@ -0,0 +1,148 @@
#!/bin/bash
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
#
# Run specified performance tests and
# gather details about the test run
#
runTest()
{
echo "$@"
echo "$@ --csv -o $LOG_DIR" >> $LOG_DIR/TestRun.log 2>&1
./$@ --csv -o $LOG_DIR >> $LOG_DIR/TestRun.log 2>&1
}
showUsageExit()
{
echo "Usage $0 <Path to Test Pack> <LOG DIR> <TEST LIST FILE>"
exit 1
}
# Ensure we have minimum of three arguments
if [[ $# > 2 ]] ; then
TEST_VERSION=$1
LOG_DIR=$2
TEST_LIST=$3
# Remove these arguments from the $@ variable
shift
shift
shift
else
showUsageExit
fi
#
# Check the specified broker is reachable
# it it is not the log and show usage
#
if [ ! -d $TEST_VERSION ] ; then
echo "Tests not available at: $TEST_VERSION"
showUsageExit
fi
#
# Check to see if we have an absolute path for logging
#
logStart=`echo $LOG_DIR|cut -c 1`
#
# If we don't have an absolute path then add the current
# directory path to the start.
#
if [[ $logStart != '/' ]] ; then
echo -n "$LOG_DIR is not absolute, using "
LOG_DIR=`pwd`/$LOG_DIR
echo $LOG_DIR
fi
#
# Validate that the directory does not exist
# - this is so we can guarrantee a clean run.
# If it does exit then log and show usage
#
if [ -d $LOG_DIR ] ; then
echo "Log directory already exists : $LOG_DIR"
showUsageExit
fi
#
# Check to see if we have an absolute path for test list
#
testListStart=`echo $TEST_LIST|cut -c 1`
#
# If we don't have an absolute path then add the current
# directory path to the start.
#
if [[ $testListStart != '/' ]] ; then
echo -n "$TEST_LIST is not absolute, using "
TEST_LIST=`pwd`/$TEST_LIST
echo $TEST_LIST
fi
#
# Validate that the directory does not exist
# - this is so we can guarrantee a clean run.
# If it does exit then log and show usage
#
# -r Check file exists and is readable
if [ ! -r $TEST_LIST ] ; then
echo "Test file is not readable : $TEST_LIST"
showUsageExit
fi
#
# Create the logging directory
#
mkdir -p $LOG_DIR
echo "Starting Test Run in : $TEST_VERSION"
pushd $TEST_VERSION/bin > /dev/null
#
# Run tests
#
while read testCommand
do
runTest $testCommand
done < "$TEST_LIST"
popd > /dev/null
#
# Generate Stat files
#
echo "Generating Stat data"
for file in `find $LOG_DIR -name "*.csv"` ; do
stat $file > $file.stat
done

View file

@ -0,0 +1,124 @@
#!/bin/bash
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
#
# Script to stop the running of a monitored broker
# and the associated monitoring processes.
#
# Looks in the specifed directory for pid files and
# stops those proceses
#
usage()
{
echo "Usage: $0 <LOG_DIR>"
}
#
# Attempt to gracefully kill processs
#
stopRun()
{
kill $PIDS
}
#
# Forcibly stop processes
#
forceStopRun()
{
kill -9 $PIDS
}
#
# Show usage if we are not started correctly
#
if [ $# != 1 ] ; then
usage
exit 1
fi
LOG_DIR=$1
PIDS=`cat $LOG_DIR/*.pid`
echo "Preparing to stop:"
#
# Escape the path so we can use sed to remove it.
#
path=`echo $LOG_DIR|sed -e s/\\\//\\\\\\\\\\\//g`
for i in `ls $LOG_DIR/*.pid` ; do
# Remove path from pid item then remove any final '/'
echo $i|cut -d '.' -f 1| sed -e s/$path// |tr '/' ' '
done
status=`ps $PIDS |wc -l`
if [ $status == 1 ] ; then
echo "Processes do not appear to be running."
echo "Have they already been stopped?"
exit 0
fi
attempts=3
while [ ! $status == 1 ] ; do
stopRun
sleep 1
status=`ps $PIDS |wc -l`
if [ $status == 1 ] ; then
echo "Done"
exit 0
else
attempts=$[ $attempts - 1 ]
if [ $attempts == 0 ] ; then
break
fi
echo "Sleeping as processes not stopped"
sleep 2
fi
done
# If we haven't been able to kill the processes then
# forcibly do it
if [ ! $status == 1 ] ; then
forceStopRun
sleep 1
status=`ps $PIDS |wc -l`
if [ $status == 1 ] ; then
echo "Done"
else
echo "Stop failed"
exit 1
fi
else
echo "Done"
fi

View file

@ -0,0 +1,285 @@
#!/bin/bash
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
usage()
{
echo "usage: process.sh <Qpid Version> <Test Type Queue/Topic/Latency..> <Volume of data %age> <broker details>"
echo "These parameters are used to title and name the graphs:"
echo 'Title = $<Qpid Version> $<Test Type> : $<Volume>% volume'
echo 'File = $<Qpid Version>-$<Broker Details>-$<Test Type>-$<Volume>'
exit 1
}
processCMSGCFile()
{
# Extract all the ParNew timings: Ignore any lines corrupted by concurrent CMS logging.
grep -v CMS gc.log|grep ParNew > $work/parnew.gc.log
# Calculate Full GC Data
grep failure -B 1 gc.log | sed -e :a -e '$!N;s/\n.(concurrent/ /;ta' -e 'P;D' |grep -v ^\- > $work/full.gc.log
cut -d ':' -f 1 $work/full.gc.log > $work/full.time.log
sed -e 's/failure)/\#/g' $work/full.gc.log |cut -d '#' -f 2- |awk '{print $3}' > $work/full.dur.log
# Move to the working directory to further process the gathered data.
pushd $work &> /dev/null
# Extract the Heap and timing data.
#8 is the full gc data
#5 is the paranew gc data
cat parnew.gc.log | awk '{print $8}' | cut -d '(' -f 2 | cut -d 'K' -f 1 > HEAP_MAX.log
cat parnew.gc.log | awk '{print $8}' | cut -d 'K' -f 1 > HEAP_PRE_GC.log
cat parnew.gc.log | awk '{print $8}' | cut -d 'K' -f 2 | cut -d '>' -f 2 > HEAP_POST_GC.log
cat parnew.gc.log | awk '{print $1}' | cut -d ':' -f 1 > GC_TIME.log
# Calculate ParNew GC Cumulative total
cat parnew.gc.log |awk '{sum=sum+$6; print $6, sum}' > GC_DUR.log
# Give a count of GC occurances
parNewGCCount=`wc -l GC_DUR.log| awk '{print $1}'`
# Create the Heap data file
paste GC_TIME.log HEAP_POST_GC.log HEAP_PRE_GC.log HEAP_MAX.log > GC.Heap.data
# Create ParNew GC Duration data file for graphing
paste GC_TIME.log GC_DUR.log > GC.Dur.data
# Create Full GC occurance log file for plotting
paste full.time.log full.dur.log > GC.Full.data
# Calculate All GC Timing and give a count of their occurance
awk '{print $1}' GC_DUR.log > gc_dur.log
paste GC_TIME.log gc_dur.log > gc_all.log
cat GC.Full.data >> gc_all.log
sort -n gc_all.log | awk '{sum=sum+$2;print $1 , sum}' > GC.Dur.All.data
fullGCCount=`wc -l GC.Full.data| awk '{print $1}'`
}
processG1GCFile()
{
cat gc.log | grep -e \^[0-9]*.[0-9]*\: -e \^.*[0-9]*.\-\> > $work/g1.gc.log
# Move to the working directory to further process the gathered data.
pushd $work &> /dev/null
# Calculate Full GC Data
cat g1.gc.log | sed -e :a -e '$!N;s/\n.\ *\[/ \[/;ta' -e 'P;D' > full.gc.log
grep Full full.gc.log |awk '{print $1}'| tr ':' ' ' > full.time.log
grep Full full.gc.log |awk '{print $5}' > full.dur.log
fullGCCount=`wc -l GC.Full.data| awk '{print $1}'`
# Create Full GC occurance log file for plotting
paste full.time.log full.dur.log > GC.Full.data
# Extract the Heap and timing data.
# Create G1 Young Duration data file for graphing
grep "(young)," full.gc.log |awk '{print $1}' | tr ':' ' ' > GC_TIME.log
grep "(young)," full.gc.log |awk '{print $5}' > young.gc.time.log
# Calculate G1 young Cumulative total
cat young.gc.time.log |awk '{sum=sum+$1; print $1, sum}' > GC_DUR.log
# Create G1 Young Duration data file for graphing
paste GC_TIME.log GC_DUR.log > GC.Dur.data
# Give a count of GC occurances
youngGCCount=`wc -l GC_DUR.log| awk '{print $1}'`
#
# If we have no GCs then something is wrong
if [ $youngGCCount == 0 ] ; then
echo "Error no YoungGC log entries to proceses"
return
fi
# Gather the Heap Size data
grep "(young)," full.gc.log | awk '{print $8}' | cut -d '(' -f 2 | cut -d ')' -f 1 > HEAP_MAX.Sized.log
grep "(young)," full.gc.log | awk '{print $8}' | cut -d '-' -f 1 > HEAP_PRE_GC.Sized.log
grep "(young)," full.gc.log | awk '{print $8}' | cut -d '>' -f 2| cut -d '(' -f 1 > HEAP_POST_GC.Sized.log
normaliseSizeMemFile HEAP_MAX.Sized.log HEAP_MAX.log
normaliseSizeMemFile HEAP_PRE_GC.Sized.log HEAP_PRE_GC.log
normaliseSizeMemFile HEAP_POST_GC.Sized.log HEAP_POST_GC.log
# Create the Heap data file
paste GC_TIME.log HEAP_POST_GC.log HEAP_PRE_GC.log HEAP_MAX.log > GC.Heap.data
# Calculate All GC Timing and give a count of their occurance
awk '{print $1}' GC_DUR.log > gc_dur.log
paste GC_TIME.log gc_dur.log > gc_all.log
cat GC.Full.data >> gc_all.log
sort -n gc_all.log | awk '{sum=sum+$2;print $1 , sum}' > GC.Dur.All.data
}
#
# Take an input file ($1) of lines
# <value><K|M>
# and output file $2 of <value> in whole M
#
normaliseSizeMemFile()
{
rm -f $2
for i in `cat $1` ; do
if [[ `echo $i | grep -c "K" ` == 1 ]] ; then
kb=`echo $i|cut -d 'K' -f 1`
echo $[ $kb / 1024 ] >> $2
else
echo $i|cut -d 'M' -f 1 >> $2
fi
done
}
# Parse command line
# TODO more advanced processing
# Check we have enough parameters
if [ $# != 4 ] ; then
# Take one arg to be a graph data file.
if [ $# == 1 ] ; then
textArray[0]="" # hold text
length=0
# read whole file in loop
while read line
do
textArray[$length]=$line # store line
length=$(expr $length + 1) # increase length by 1
done < $1
if [ $length != 2 ] ; then
usage
fi
#Get Title and file name
title=${textArray[0]}
file=${textArray[1]}
pushd `dirname $1`
else
usage
fi
else
version=$1
type=$2
volume=$3
brokerState=$4
# Configure Graph Title and image file names
title="$version $type : $volume% volume"
file="$version-$brokerState-$type-$volume"
fi
work=work
mkdir -p $work
echo -n "Processing GC Usage Data : "
ParNew=`grep -c ParNew gc.log`
if [ $ParNew != 0 ] ; then
echo "CMS log file"
processCMSGCFile
PLOT="\"GC.Dur.data\" with lines axis x1y1 ti \"ParNew GC Time ($parNewGCCount)\", "
else
echo "G1 log file"
processG1GCFile
PLOT="\"GC.Dur.data\" with lines axis x1y1 ti \"G1 Young Time ($youngGCCount)\", "
fi
# Prepare the plot command
# If a Full GC occured during this test then plot those
if [[ $fullGCCount > 0 ]] ; then
PLOT=$PLOT"\"GC.Dur.data\" using 1:3 with lines axis x1y2 ti \"Cumulative Total Time(ParNew)\", \
\"GC.Dur.All.data\" with lines axis x1y2 ti \"Cumulative Total Time(All)\", \
\"GC.Full.data\" with points ti \"Full GCs Time ($fullGCCount)\" "
else
PLOT=$PLOT"\"GC.Dur.data\" using 1:3 with lines axis x1y2 ti \"Cumulative Total Time(ParNew)\", \
\"GC.Dur.All.data\" with lines axis x1y2 ti \"Cumulative Total Time(All)\" "
fi
if [ $ParNew != 0 ] ; then
gcs=$parNewGCCount
else
gcs=$youngGCCount
fi
# Call out to gnuplot to generate graphs
# Only do this if we have data
if [ $gcs != 0 ] ; then
# Generate the Heap Graph and the GC Duration Graph
gnuplot << EOGNUPLOT
set xlabel "Run Time(s)"
set title "$title : Heap Size"
set term png
set output "$file-Heap.png"
set ylabel "MB" +0.5,0
plot "GC.Heap.data" using 1:2 with lines axis x1y1 ti "GC Size Post",\
"GC.Heap.data" using 1:4 with lines axis x1y1 ti "GC Size Max ", \
"GC.Heap.data" using 1:3 with lines axis x1y1 ti "GC Size Pre "
set y2tics nomirror
set ytics nomirror
set key top left
set title "$title GC Time"
set ylabel "Time(s)" +0.5,0
set y2label "Total Time(s)"
set output "$file-GCDuration.png"
plot $PLOT
EOGNUPLOT
else
echo "Warning: No GC Data to graph"
fi
# pop back to further process for CPU usage
popd &> /dev/null
echo "Processing CPU Usage Data"
# CPU.data is just TimeStamp + %age
cat broker_cpu.log |awk '{print $1 "T" $2 " " $3}' > $work/CPU.data
# Move to work directory to run gnuplot
pushd $work &> /dev/null
# Call out to gnuplot to generate graphs
# Generate the Heap Graph and the GC Duration Graph
gnuplot << EOGNUPLOT
set term png
set title "$title : CPU"
set output "$file-CPU.png"
unset key
set xlabel "Real Time(h:m)"
set ylabel "Usage(%)"
set xdata time
set timefmt "%Y-%m-%dT%H:%M:%S"
set format x "%H:%M"
plot "CPU.data" using 1:2 with lines
EOGNUPLOT
popd &> /dev/null

View file

@ -0,0 +1,54 @@
#!/bin/bash
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
usage()
{
echo "processResults.sh <search dir>"
exit 1
}
root=`pwd`
echo $root
graphFile=graph.data
if [ $# != 1 ] ; then
usage
fi
mkdir -p results
for file in `find $1 -name $graphFile` ; do
dir=`dirname $file`
echo Processing : $dir
pushd $dir &> /dev/null
$root/process.sh $graphFile
echo Copying Images
cp work/*png $root/results/
popd &> /dev/null
echo Done
done

View file

@ -0,0 +1,567 @@
#!/usr/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
import re
import datetime
import sys
import string
from optparse import OptionParser
from datetime import datetime, timedelta
import shutil
def showUsage():
log("./pT.py [-b|--broker-log-dir] <dir> [-t|--test-dir] <dir>")
ACCESS="Access"
MODIFY="Modify"
BROKER_LOG="broker.log"
BROKER_PID="broker.pid"
BROKER_CPU="broker_cpu.log"
BROKER_CPU_DATED="broker_cpu.log.dated"
BROKER_GC="gc.log"
GRAPH_DATA="graph.data"
_verbose = False
_debug = False
_brokerLogs = ""
def exitError(message):
log(message)
sys.exit(1)
def main():
global _log, _verbose, _debug, _brokerLogs
# Load the
parser = OptionParser()
parser.add_option("-v", "--verbose", dest="verbose",
action="store_true", default=False, help="enable verbose output")
parser.add_option("-d", "--debug", dest="debug",
action="store_true", default=False, help="enable debug output")
parser.add_option("-b", "--broker-log-dir", dest="brokerLogs",
action="store", default=True, help="Broker Logs")
parser.add_option("-t", "--test-dir", dest="testDir",
action="store", default="", help="Test Results")
(options, args) = parser.parse_args()
_verbose = options.verbose
_debug = options.debug
testDir = options.testDir
_brokerLogs = options.brokerLogs
if testDir == "" or _brokerLogs == "" :
log("Broker Log Dir and Test Dir are both requried.")
showUsage()
if not os.path.exists(testDir):
exitError("Test directory does not exist:" + testDir)
if not os.path.exists(_brokerLogs):
exitError("Broker log directory does not exist:" + _brokerLogs)
# Standardize the format of the broker logs
preProcessBrokerLogs(_brokerLogs)
# Get list of test results from test_dir
processTestResults(testDir)
#
# Process the log files we know of
#
def preProcessBrokerLogs(resultDir):
# Pre-Process GC - no pre processing required
# Process Log4j - no processing required as file is already time stamped.
# Pre-Process broker_cpu
processCPUUsage(resultDir)
#
# Process the broker CPU log file and create an output file of format
# <Date Time> <CPU Usage>
#
#
def processCPUUsage(resultDir):
logfile=resultDir+os.sep+BROKER_CPU
datedFile=resultDir+os.sep+BROKER_CPU_DATED
start = extractTime(ACCESS, logfile+".stat")
pid = getPID(BROKER_PID)
topRate = getFirstLine(_brokerLogs+os.sep+"top.rate")
#
# Calulate addition required per process line output
#
if topRate.find(".") == -1:
second = topRate
millis = 0
else:
split = topRate.split('.')
seconds = split[0]
# Convert
millis = float("0."+split[1]) * 1000
offset = timedelta(seconds=int(seconds),milliseconds=int(millis))
#
# Process the CPU log file and make a file of format:
# datetime <CPU% usage> <MEM% usage>
#
# Open log CPU file for reading
logfile = open(logfile, "r")
# Open the output file, erasing any existing version
output= open(datedFile, "w")
for line in logfile:
if line.find(pid) != -1:
# Split line on whitespace
data = line.split()
#
# Data format
# 0 1 2 3 4 5 6 7 8 9 10 11
# PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
#
#Write out the date time (ISO-8601 format)
output.write(str(start))
# Output the %CPU value
output.write(" "+str(data[4]))
# Output the %MEM value
output.write(" "+str(data[5]))
output.write('\n')
# Add the offset based on the logging rate
start = start + offset
# Close the files
logfile.close
output.close
log("Pre Process of CPU Log file '"+BROKER_CPU+"' complete")
#
# Give an known process type get the recorded PID.
#
def getPID(process):
return getFirstLine(_brokerLogs+os.sep+process)
#
# Get the first line of the file without EOL chars.
# NOTE: this will load the entire file into memory to do it.
#
def getFirstLine(fileName):
f = open(fileName,"r")
line = f.read().splitlines()[0]
f.close
return line
#
# Walk the directory given and process all csv test results
#
def processTestResults(resultDir):
for root, dirs, files in os.walk(resultDir, topdown=False):
if len(files) == 0:
exitError("Test result directory is empty:" + resultDir)
for file in files:
if file.endswith(".csv"):
processTestResult(root , file)
def processTestResult(root, resultFile):
# Open stat file and extract test times, we determine:
# -start time based on the 'Access' value
# -end time based on the 'Modify' value 'Change' would also work
statFile=root+os.sep+resultFile+".stat"
if not os.path.exists(statFile):
log("Unable to process : Unable to open stat file:" + statFile)
return
createResultSetPackage(root, resultFile)
def extractTime(field, statFile):
stats = open(statFile, "r")
for line in stats:
if line.startswith(field):
if line.find("(") == -1:
dt = lineToDate(" ".join(line.split()[1:]))
#
# TODO We need to handle time time zone issues as I'm sure we will have issues with the
# log4j matching.
stats.close
return dt
#
# Given a text line in ISO format convert it to a date object
#
def lineToDate(line):
#2009-06-22 17:04:44,320
#2009-06-22 17:04:44.320
pattern = re.compile(r'(?P<year>^[0-9][0-9][0-9][0-9])-(?P<month>[0-9][0-9])-(?P<day>[0-9][0-9]) (?P<hour>[0-9][0-9]):(?P<minute>[0-9][0-9]):(?P<seconds>[0-9][0-9])')
m = pattern.match(line)
if m:
year = int(m.group('year'))
month = int(m.group('month'))
day = int(m.group('day'))
hour = int(m.group('hour'))
minute = int(m.group('minute'))
seconds = int(m.group('seconds'))
pattern = re.compile(r'(?P<year>^[0-9][0-9][0-9][0-9])-(?P<month>[0-9][0-9])-(?P<day>[0-9][0-9]) (?P<hour>[0-9][0-9]):(?P<minute>[0-9][0-9]):(?P<seconds>[0-9][0-9])[.|,](?P<micro>[0-9]+)')
m = pattern.match(line)
micro = None
if m:
micro = m.group('micro')
if micro == None:
micro = 0
return datetime(year,month,day,hour,minute,seconds,int(micro))
else:
# Error we shouldn't get here
return null
def createResultSetPackage(root, resultFile):
# Get the Name of the test to make a directory with said name
testName = resultFile.split(".csv")[0]
resultDir = root+ os.sep + testName
log("Processing Result set for:"+ testName)
mkdir(resultDir)
# Move result file to new directory
shutil.move(root + os.sep + resultFile, resultDir)
# Move stat file to new directory
shutil.move(root + os.sep + resultFile + ".stat", resultDir)
statFile=resultDir + os.sep + resultFile + ".stat"
#
# Get start and end time for test run
#
start = extractTime(ACCESS, statFile)
end = extractTime(MODIFY, statFile)
sliceBrokerLogs(resultDir, start, end)
createGraphData(resultDir, testName)
log("Created Result Package for:"+ testName)
def sliceBrokerLogs(resultDir, start, end):
sliceCPULog(resultDir, start, end)
sliceLog4j(resultDir, start, end)
sliceGCLog(resultDir, start, end)
def sliceCPULog(resultDir, start, end):
global _brokerLogs
logfilePath=_brokerLogs+os.sep+BROKER_CPU_DATED
cpuSliceFile=resultDir+os.sep+BROKER_CPU
# Process the CPU log file and make a file of format:
# datetime <CPU% usage> <MEM% usage>
#
# Open log CPU file for reading
logFile = open(logfilePath, "r")
#
# Create outputfile
#
cpuslice = open(cpuSliceFile,"w")
for line in logFile:
data = line.split()
#
# //fixme remove tz addition.
#
lineTime = lineToDate(" ".join(data[0:2])+" +0000")
if lineTime > start:
if lineTime < end:
cpuslice.writelines(line)
logFile.close()
cpuslice.close()
log("Sliced CPU log")
def sliceGCLog(resultDir, start, end):
global _brokerLogs
logfilePath=_brokerLogs+os.sep+BROKER_GC
sliceFile=resultDir+os.sep+BROKER_GC
gcstart = extractTime(ACCESS, logfilePath+".stat")
# Open log GC file for reading
logFile = open(logfilePath, "r")
# Open the output file, erasing any existing version
output= open(sliceFile, "w")
# Use a regular expression to pull out the Seconds.Millis values from the
# Start of the gc log line.
pattern = re.compile(r'(?P<seconds>^[0-9]+)\.(?P<millis>[0-9]+):')
for line in logFile:
m = pattern.match(line)
if m:
seconds = m.group('seconds');
millis = m.group('millis');
offset = timedelta(seconds=int(seconds),milliseconds=int(millis))
lineTime = gcstart + offset
if lineTime > start:
if lineTime < end:
output.writelines(line)
# Close the files
logFile.close
output.close()
log("Sliced gc log")
def sliceLog4j(resultDir, start, end):
global _brokerLogs
logfilePath=_brokerLogs+os.sep+BROKER_LOG
log4jSliceFile=resultDir+os.sep+BROKER_LOG
log4jstart = extractTime(ACCESS, logfilePath+".stat")
#
# Say that first line is the start of the file,
# This value will give a time value to the initial
# logging before Log4j kicks in.
#
lineTime = log4jstart
# Process the broker log4j file
# Open log CPU file for reading
logFile = open(logfilePath, "r")
#
# Create outputfile
#
log4jslice = open(log4jSliceFile,"w")
for line in logFile:
data = line.split()
#
# If the line has a time at the start then process it
# otherwise use the previous time. This means if there is
# a stack trace in the middle of the log file then it will
# be copied over to the split file as long as it is in the
# split time.
#
if (hasTime(data)):
#
# //fixme remove tz addition.
#
lineTime = lineToDate(" ".join(data[0:2])+" +0000")
if lineTime > start:
if lineTime < end:
print line
log4jslice.writelines(line)
logFile.close()
log4jslice.close()
log("Sliced broker log")
#
# Check the first two entries of data can make a datetime object
#
def hasTime(data):
date = data[0]
time = data[1]
# Examples:
# 2009-06-22 17:04:44,246
# 2009-06-22 17:04:44.2464
# 2009-06-22 17:04:44
# ISO-8601 '-' format date
dateRE = re.compile('[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]')
#
# Check for times with/out millis
# e.g.
# 10:00:00,000 - log4j
# 10:00:00.0000 - generated in script for cpu time
#
timeRE = re.compile('[0-9][0-9]:[0-9][0-9]:[0-9][0-9]?[0-9]*')
return dateRE.match(date) and timeRE.match(time)
def createGraphData(resultDir, testName):
# Create graph.data file for process.sh
# Format two lines : Title and filename
# $version $type : $volume% volume
# $version-$brokerState-$type-$volume
version=getBrokerVersion()
test= extractTestValue("n",resultDir, testName)
volume = int(float(extractTestResult("Test * Size Throughput", resultDir, testName)) * 1000)
messageSize = extractTestValue("messageSize",resultDir, testName)
ackMode = ackModeToString(extractTestValue("consAckMode",resultDir, testName))
graphDataFile=resultDir+os.sep+GRAPH_DATA
graphData = open(graphDataFile, "w")
#
# Write Title
graphData.write(version+":"+test+":"+str(messageSize)+"kb x "+str(volume)+" msg/sec using "+ackMode)
graphData.write('\n')
#
# Write FileName
graphData.writelines(version+"-"+testName)
graphData.write('\n')
graphData.close
log("Created graph.data")
def getBrokerVersion():
global _brokerLogs
READY = "Qpid Broker Ready"
brokerLogFile = _brokerLogs + os.sep + BROKER_LOG
log = open(brokerLogFile, "r")
dataLine = ""
for line in log:
if line.find(READY) != -1:
dataLine = line
break
# Log Entry
#2009-06-19 17:04:02,493 INFO [main] server.Main (Main.java:456) - Qpid Broker Ready :2.3.0.1 build: 727403M
# Split on READY
data = dataLine.split(READY)
# So [1] should be
# :2.3.0.1 build: 727403M
readyEntries = data[1].split()
# so spliting on white space should give us ':version'
# and a quick split on ':' will give us the version
version = readyEntries[0].split(':')[1]
# Strip to ensure we have no whitespace
return version.strip()
def extractTestValue(property,resultDir,testName):
return extractTestData(property,resultDir,testName," =")
def extractTestResult(property,resultDir,testName):
return extractTestData(property,resultDir,testName,":")
def extractTestData(property,resultDir,testName,type):
resultFile = resultDir + os.sep + testName+".csv"
results = open(resultFile, "r")
dataLine = ""
for line in results:
if line.find("Total Tests:") == 0:
dataLine = line
results.close()
# Data is CSV
data = dataLine.split(',')
found = False
result = ""
searchProperty = property+type
for entry in data:
if found:
result = entry
break
if entry.strip() == searchProperty:
found=True
return result.strip()
def ackModeToString(ackMode):
if ackMode == '0':
return "Transacted"
elif ackMode == '1':
return "AutoAck"
elif ackMode == '2':
return "ClientAck"
elif ackMode == '3':
return "DupsOK"
elif ackMode == '257':
return "NoAck"
elif ackMode == '258':
return "PreAck"
else:
return str(ackMode)
def debug(msg):
global _debug
if _debug:
log(msg)
def log(msg):
print msg
def mkdir(dir):
if not os.path.exists(dir):
os.mkdir(dir)
if __name__ == "__main__":
main()

View file

@ -0,0 +1,30 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# args:
# <number of processes to start>
# <name of run>
# <command ro run>
for i in `seq 1 $1`; do
$3 >$2.$i.out 2>>$2.err &
echo $! > $2.$i.pid
done;

View file

@ -0,0 +1,32 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# XXX -Xmx512m -Xms512m -XX:NewSize=150m
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM="-Xmx128m -Dlog4j.configuration=$HOME/log4j.properties" \
JAVA_GC="-XX:-UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.oldtopic.Listener $*

View file

@ -0,0 +1,31 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# XXX -Xmx512m -Xms512m -XX:NewSize=150m
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx128m \
JAVA_GC="-XX:-UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.oldtopic.Publisher $*

View file

@ -0,0 +1,88 @@
#!/usr/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
import re
import datetime
from optparse import OptionParser
BASE_CMD = "mvn -Dskip.python.test=true %s test"
def main():
parser = OptionParser()
parser.add_option("-t", "--test", dest="test",
action="store", type="string",
help="run specific tests")
parser.add_option("-c", "--continuous", dest="continuous",
action="store_true", default=False,
help="run tests after failures, don't stop")
(options, args) = parser.parse_args()
# determine command to run
if (options.test != None):
cmd = (BASE_CMD % ("-Dtest="+options.test))
else:
cmd = (BASE_CMD % (""))
run_forever = options.continuous
failed_runs = []
iteration = 0
fail_match = re.compile("BUILD SUCCESSFUL")
done = False
while (run_forever or not (len(failed_runs) > 0)):
iteration = iteration + 1
if (run_forever):
extra_text = (", %d failures so far: %s:" % (len(failed_runs), failed_runs))
else:
extra_text = ""
print ("%s Test run %d%s" % (datetime.datetime.today().isoformat(), iteration, extra_text))
(child_stdin, child_stdout_and_stderr) = os.popen4(cmd)
output = child_stdout_and_stderr.read()
child_stdin.close()
child_stdout_and_stderr.close()
matches = fail_match.search(output)
if (matches == None):
failed_runs.append(iteration)
output_name = ("test-run-%d.out" % (iteration))
#write testouput
test_output = file(output_name, "w")
test_output.write(output)
test_output.close()
#tar test-output and surefire reports together
find_stdout = os.popen("find . -type d -name surefire-reports")
surefire_dirs = find_stdout.read().replace('\n', ' ')
find_stdout.close()
tarcmd = ("tar -zcf test-failures-%d.tar.gz %s %s" % (iteration, output_name, surefire_dirs))
tar_stdout = os.popen(tarcmd)
tar_output = tar_stdout.read()
tar_exitstatus = tar_stdout.close()
print ("Something failed! Check %s" % (output_name))
if (tar_exitstatus != None):
print ("tar exited abornmally, aborting\n %s" % (tar_output))
run_forever = False
if __name__ == "__main__":
main()

View file

@ -0,0 +1,23 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
for x in `seq 1 $1`;
do
java -cp qpid-integrationtests-1.0-incubating-M2-SNAPSHOT-all-test-deps.jar -Dlog4j.configuration=file:/home/rupert/qpid/trunk/qpid/java/etc/mylog4j.xml org.apache.qpid.test.framework.distributedtesting.TestClient -n java$x &
done

View file

@ -0,0 +1,30 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This is wrapper script to run the tests defined in testkit.py
# via the python test runner. The defaults are set for a running
# from an svn checkout
. ./setenv.sh
export PYTHONPATH=../:$PYTHONPATH
rm -rf $OUTDIR
$PYTHON_DIR/qpid-python-test -DOUTDIR=$OUTDIR -m testkit "$@"

View file

@ -0,0 +1,70 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This is a sample script for a soak test on
# linux environment.
# This will start n of Producers processors and record their CPU and memory stats.
# Also the Producer out will be saved to a file as well.
if [ "$JAR_PATH" = "" ] ; then
echo "ERROR: Please set JAR_PATH to point to the Qpid libraries ...."
exit 1
fi
#1 PID, $2 freq, $3 count
calc_stats(){
for (( i = 0 ; i <= $3; i++ ))
do
cpu=`ps auxw | grep $1 | grep -v 'grep' | awk '{print $3}'`
mem=`pmap $1 | grep total | grep -v 'grep' | awk '{print substr($2,0,length($2)-1)}'`
echo $i","$mem","$cpu
sleep $2
cpu="0.0"
mem="0"
done
kill -9 $1
}
# Num of producer processors to start
num=$1
# Log frequency in seconds
log_freq=$2
# Num of iterations
log_iter=$3
class_name=$4
log_file_name=`echo $class_name | cut -d. -f6`
# The total time for the test is determined by the
# log_freq * log_iter.
shift 4
CLASSPATH=`find $JAR_PATH -name '*.jar' | tr '\n' ":"`
JVM_ARGS="-Xmx1500M $@"
echo "Starting $log_file_name with the following params $JVM_ARGS"
for (( c = 1 ; c <= $num; c++ ))
do
$JAVA_HOME/bin/java $JVM_ARGS -cp $CLASSPATH $class_name > ${log_file_name}_${c}.log &
pid=`jobs -l %% | awk '{print $2}'`
calc_stats $pid $log_freq $log_iter > ${log_file_name}_process_${c}.log &
done

View file

@ -0,0 +1,78 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# If QPIDD_EXEC ..etc is not set, it will first check to see
# if this is run from a qpid svn check out, if not it will look
# for installed rpms.
abs_path()
{
D=`dirname "$1"`
B=`basename "$1"`
echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
}
# Environment for python tests
if [ -d ../../../python ] ; then
PYTHON_DIR=../../../python
PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid
elif [ -z `echo $PYTHONPATH | awk '$0 ~ /qpid/'` ]; then
echo "WARNING: skipping test, no qpid python scripts found ."; exit 0;
fi
if [ "$QPIDD_EXEC" = "" ] ; then
if [ -x ../../../cpp/src/qpidd ]; then
QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"`
elif [ -n "$(which qpidd)" ] ; then
QPIDD_EXEC=$(which qpidd)
else
echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0;
fi
fi
if [ "$CLUSTER_LIB" = "" ] ; then
if [ -x ../../../cpp/src/.libs/cluster.so ]; then
CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"`
elif [ -e /usr/lib64/qpid/daemon/cluster.so ] ; then
CLUSTER_LIB="/usr/lib64/qpid/daemon/cluster.so"
elif [ -e /usr/lib/qpid/daemon/cluster.so ] ; then
CLUSTER_LIB="/usr/lib/qpid/daemon/cluster.so"
else
echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0;
fi
fi
if [ "$QP_CP" = "" ] ; then
if [ -d ../../build/lib/ ]; then
QP_JAR_PATH=`abs_path "../../build/lib/"`
elif [ -d /usr/share/java/qpid-deps ]; then
QP_JAR_PATH=`abs_path "/usr/share/java"`
else
"WARNING: skipping test, QP_CP not set and the Qpid jars are not present."; exit 0;
fi
QP_CP=`find $QP_JAR_PATH -name '*.jar' | tr '\n' ':'`
fi
if [ "$OUTDIR" = "" ] ; then
OUTDIR=`abs_path "../output"`
fi
export PYTHONPATH PYTHON_DIR QPIDD_EXEC CLUSTER_LIB QP_CP OUTDIR

View file

@ -0,0 +1,161 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Sample script to run a soak test with MultiThreadedProducer/Consumer.
# You need to provide the log freq and no of iterations
# Ex to run 10 hours and collect 1 second samples
# soak_report.sh 1 36000
# This script assumes that a suitable broker instance is started.
log_freq=$1
log_iter=$2
shift 2
JVM_ARGS=$@
if [ "$QPID_TEST_HOME" = "" ] ; then
echo "ERROR: Please set QPID_TEST_HOME ...."
exit 1
fi
print_rates()
{
cat $1 | awk '{
FS = ",";
count = 0;
total_latency = 0;
min_latency = 9223372036854775807;
max_latency = 0;
total_tp = 0;
min_tp = 50000;
max_tp = 0;
while ((getline) == 1)
{
total_latency = total_latency + $3
total_tp = total_tp + $2
if ($3 > 0)
{
min_latency = (($3 < min_latency) ? $3 : min_latency);
max_latency = (($3 > max_latency) ? $3 : max_latency);
}
if ($2 > 0)
{
min_tp = (($2 < min_tp) ? $2 : min_tp);
max_tp = (($2 > max_tp) ? $2 : max_tp);
}
count = count + 1
}
print "Avg Latency (ms) : " total_latency/count
print "Max Latency (ms) : " max_latency
print "Min Latency (ms) : " min_latency
print ""
print "Avg Throughput (msg/sec) : " total_tp/count
print "Max Throughput (msg/sec) : " max_tp
print "Min Throughput (msg/sec) : " min_tp
print ""
print "Total Iteratons " count
}'
}
print_system_stats()
{
cat $1 | awk '{
FS = ",";
count = 0;
total_memory = 0;
min_memory = 9223372036854775807;
max_memory = 0;
total_cp = 0;
min_cp = 50000;
max_cp = 0;
while ((getline) == 1)
{
total_memory = total_memory + $2
total_cp = total_cp + $3
if ($2 > 0)
{
min_memory = (($2 < min_memory) ? $2 : min_memory);
max_memory = (($2 > max_memory) ? $2 : max_memory);
}
if ($3 > 0)
{
min_cp = (($3 < min_cp) ? $3 : min_cp);
max_cp = (($3 > max_cp) ? $3 : max_cp);
}
count = count + 1
}
print "Avg Memory (MB) : " total_memory/(count*1024)
print "Max Memory (MB) : " max_memory/1024
print "Min Memory (MB) : " min_memory/1024
print ""
print "Avg CPU : " total_cp/count
print "Max CPU : " max_cp
print "Min CPU : " min_cp
print ""
print "Total Iteratons " count
}'
}
cleanup()
{
kill -9 `ps aux | grep java | grep soak | awk '{ print $2 }'`
}
print_results()
{
printf "\n======================================================= \n"
print_rates MultiThreadedConsumer_1.log
printf "\nConsumer process stats "
printf "\n----------------------- \n"
print_system_stats MultiThreadedConsumer_process_1.log
printf "\nProducer process stats "
printf "\n----------------------- \n"
print_system_stats MultiThreadedProducer_process_1.log
printf "\n------------------------------------------------------- \n"
}
trap cleanup EXIT
# runs a single instance of the MultiThreadedConsumer and MultiThreadedProducer
sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedConsumer $JVM_ARGS
sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedProducer $JVM_ARGS
sleep_time=$((log_freq * log_iter))
echo "sleep time : " $sleep_time
sleep $((log_freq * log_iter))
print_results

View file

@ -0,0 +1,131 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This will run the 8 use cases defined below and produce
# a report in tabular format. Refer to the documentation
# for more details.
SUB_MEM=-Xmx1024M
PUB_MEM=-Xmx1024M
LOG_CONFIG="-Damqj.logging.level=WARN"
. setenv.sh
waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; }
cleanup()
{
pids=`ps aux | grep java | grep Perf | awk '{print $2}'`
if [ "$pids" != "" ]; then
kill -3 $pids
kill -9 $pids >/dev/null 2>&1
fi
}
# $1 test name
# $2 consumer options
# $3 producer options
run_testcase()
{
sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out &
waitfor sub.out "Warming up"
sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out &
waitfor sub.out "Completed the test"
waitfor pub.out "Consumer has completed the test"
sleep 2 #give a grace period to shutdown
print_result $1
}
print_result()
{
prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'`
sys_rate=`cat sub.out | grep "System Throughput" | awk '{print $4}'`
cons_rate=`cat sub.out | grep "Consumer rate" | awk '{print $4}'`
avg_latency=`cat sub.out | grep "Avg Latency" | awk '{print $4}'`
min_latency=`cat sub.out | grep "Min Latency" | awk '{print $4}'`
max_latency=`cat sub.out | grep "Max Latency" | awk '{print $4}'`
printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11d|%11d|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency
echo "------------------------------------------------------------------------------------------------"
}
trap cleanup EXIT
echo "Test report on " `date +%F`
echo "================================================================================================"
echo "|Test |System throuput|Producer rate|Consumer Rate|Avg Latency|Min Latency|Max Latency|"
echo "------------------------------------------------------------------------------------------------"
# Test 1 Trans Queue
run_testcase "Trans_Queue" "" "-Dwarmup_count=1 -Dmsg_count=10"
# Test 2 Dura Queue
run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10"
# Test 3 Dura Queue Sync
run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true"
# Test 4 Dura Queue Sync Publish and Ack
run_testcase "Dura_SyncPubAck" "-Ddurable=true -Dsync_ack=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_publish=persistent"
# Test 5 Topic
run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 6 Durable Topic
run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 7 Fanout
run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10"
# Test 8 Small TX
run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \
"-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1"
# Test 9 Large TX
run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \
"-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10"
# Test 10 256 MSG
run_testcase "Msg_256b" "" "-Dmsg_size=256 -Dwarmup_count=1 -Dmsg_count=10"
# Test 11 512 MSG
run_testcase "Msg_512b" "" "-Dmsg_size=512 -Dwarmup_count=1 -Dmsg_count=10"
# Test 12 2048 MSG
run_testcase "Msg_2048b" "" "-Dmsg_size=2048 -Dwarmup_count=1 -Dmsg_count=10"
# Test 13 Random size MSG
run_testcase "Random_Msg_Size" "" "-Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10"
# Test 14 Random size MSG Durable
run_testcase "Rand_Msg_Dura" "-Ddurable=true" "-Ddurable=true -Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10"
# Test 15 64K MSG
run_testcase "Msg_64K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Dwarmup_count=1 -Dmsg_count=10"
# Test 16 Durable 64K MSG
run_testcase "Msg_Durable_64K" "-Ddurable=true -Damqj.tcpNoDelay=true" \
"-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10"
# Test 17 500K MSG
run_testcase "Msg_500K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Dwarmup_count=1 -Dmsg_count=10"
# Test 18 Durable 500K MSG
run_testcase "Msg_Dura_500K" "-Damqj.tcpNoDelay=true -Ddurable=true" \
"-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10"

View file

@ -0,0 +1,35 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
export PATH=${PATH}:${QPID_HOME}/bin
fi
# Set classpath to include Qpid jar with all required jars in manifest
QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
QPID_CLASSPATH=$QPID_LIBS
. qpid-run org.apache.qpid.tools.QpidBench "$@"

View file

@ -0,0 +1,24 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
. $QPID_TEST_HOME/bin/setenv.sh
echo "$@"
$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer

View file

@ -0,0 +1,25 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
. $QPID_TEST_HOME/bin/setenv.sh
echo "$@"
$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer

View file

@ -0,0 +1,49 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Compiles the test classes and sets the CLASSPATH
# check for QPID_TEST_HOME
if [ "$QPID_TEST_HOME" = "" ] ; then
echo "ERROR: Please set QPID_TEST_HOME ...."
exit 1
fi
# check for JAVA_HOME
if [ "$JAVA_HOME" = "" ] ; then
echo "ERROR: Please set JAVA_HOME ...."
exit 1
fi
# VENDOR_LIB path needs to be set
# for Qpid set this to {qpid_checkout}/java/build/lib
if [ "$VENDOR_LIB" = "" ] ; then
echo "ERROR: Please set VENDOR_LIB path in the script ...."
exit 1
fi
[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes
CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"`
$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH

View file

@ -0,0 +1,36 @@
#!/bin/bash
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
# resolve/set local variables
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
dir=$(dirname $dir)
awips_home=$(dirname $dir)
rpm -q awips2-java > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: awips2-java Must Be Installed."
echo "Unable To Continue ... Terminating."
fi
JAVA_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}' awips2-java`
${JAVA_INSTALL}/bin/java -classpath $awips_home/edex/lib/plugins/plugin-warning.jar:$awips_home/edex/lib/dependencies/org.geotools/jts-1.9.jar com.raytheon.edex.plugin.warning.tools.DamInfoTranslator $@

View file

@ -0,0 +1,58 @@
### EDEX localization related variables ###
export AW_SITE_IDENTIFIER=OAX
# database names
export DC_DB_NAME=dc_ob7oax
export FXA_DB_NAME=fxatext
export HM_DB_NAME=hmdb
export IH_DB_NAME=hd_ob83oax
### end of localization variables ###
# setup environment for HPE
export DATA_ARCHIVE_ROOT=/tmp/sbn
# setup db connections
export DB_ADDR=localhost
export DB_PORT=5432
# setup connection to qpid
export BROKER_ADDR=localhost
# setup hdf5 connection if pypies is enabled
export PYPIES_SERVER=http://localhost:9582
# data delivery specific variables, used below in the localization section
export DATADELIVERY_HOST=localhost
export DATADELIVERY_PORT=9588
# Currently the registry is hosted on datadelivery, but this could be changed in the future
export EBXML_REGISTRY_HOST=${DATADELIVERY_HOST}
export EBXML_REGISTRY_PORT=${DATADELIVERY_PORT}
export EBXML_REGISTRY_SOAP_PORT=10144
# moved here from environment.xml
# these values are returned to clients that contact the localization service
export HTTP_PORT=9581
export HTTP_SERVER=http://localhost:${HTTP_PORT}/services
export JMS_SERVER=tcp://localhost:5672
export RADAR_SERVER=tcp://localhost:8813
export DATADELIVERY_SERVER=http://${DATADELIVERY_HOST}:${DATADELIVERY_PORT}/services
export EBXML_REGISTRY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/services
export EBXML_REGISTRY_LCM_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/lcm?WSDL
export EBXML_REGISTRY_QUERY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/query?WSDL
export NCF_BANDWIDTH_MANAGER_SERVICE=http://${DATADELIVERY_HOST}:9590/services
# set the AWIPS II shared directory
export SHARE_DIR=/awips2/edex/data/share
# set the AWIPS II temporary directory
export TEMP_DIR=/awips2/edex/data/tmp
# set hydroapps directory path
export apps_dir=${SHARE_DIR}/hydroapps
# site identifier for hydroapps
export SITE_IDENTIFIER=${AW_SITE_IDENTIFIER}
# set Fax environment variables pointing to ldad@ls1
export LDAD_EXTERNAL_HOME=/ldad
export LDAD_EXTERNAL_PUBLIC=/data/ldad/public

View file

@ -0,0 +1,152 @@
#!/bin/bash
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
# edex startup script
# Verify that awips2-python and awips2-java are installed.
rpm -q awips2-python > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: awips2-python Must Be Installed."
echo "Unable To Continue ... Terminating."
exit 1
fi
rpm -q awips2-java > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: awips2-java Must Be Installed."
echo "Unable To Continue ... Terminating."
exit 1
fi
rpm -q awips2-psql > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: awips2-psql Must Be Installed."
echo "Unable To Continue ... Terminating."
exit 1
fi
# Find the locations of awips2-python and awips2-java.
PYTHON_INSTALL="/awips2/python"
JAVA_INSTALL="/awips2/java"
PSQL_INSTALL="/awips2/psql"
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
export EDEX_HOME=$(dirname $dir)
awips_home=$(dirname $EDEX_HOME)
# Source The File With The Localization Information
source ${dir}/setup.env
#source /awips2/edex/bin/yajsw/bin/setenv.sh
### AWIPS 1 support ###
if [ -f /etc/rc.config.d/AWIPS ]; then
. /etc/rc.config.d/AWIPS
fi
export SHLIB_PATH=$PROJECT/sharedlib
### End AWIPS 1 support ###
export HOSTNAME=`hostname`
# set Python & Java into the path
export PATH=$awips_home/bin:${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
# set Service Backup scripts into the path
export PATH=$PATH:$awips_home/GFESuite/bin:$awips_home/GFESuite/ServiceBackup/scripts
# set AWIPS 1 stuff into path
export PATH=$PATH:$PROJECT/bin
export JAVA_HOME="${JAVA_INSTALL}"
export LD_LIBRARY_PATH=$EDEX_HOME/lib/native/linux32/awips1:${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:${PSQL_INSTALL}/lib:$PROJECT/sharedLib
export LD_LIBRARY_PATH=/awips2/edex/lib/lib_illusion:$LD_LIBRARY_PATH
export LD_PRELOAD="libpython.so"
export FXA_DATA=$EDEX_HOME/data/fxa
export ALLOW_ARCHIVE_DATA="false"
# setup environment for HPE
export AMQP_SPEC=$awips_home/python/share/amqp/amqp.0-10.xml
#-------------------------------------------------------------------------
#read and interpret the command line arguments
#-------------------------------------------------------------------------
CONSOLE_FLAG=on
CONSOLE_LOGLEVEL=DEBUG
DEBUG_FLAG=off
PROFILE_FLAG=off
HIGH_MEM_FLAG=off
CONF_FILE="wrapper.conf"
RUN_MODE=
for arg in $@
do
case $arg in
-b|-d|--debug|-db|-bd) DEBUG_FLAG=on;;
-p|--profiler) PROFILE_FLAG=on;;
-h|--highmem) HIGH_MEM_FLAG=on;;
-noConsole) CONSOLE_FLAG=off;;
*) RUN_MODE=$arg;;
esac
done
export HIGH_MEM_FLAG
export EDEX_RUN_MODE=$RUN_MODE
if [ $CONSOLE_FLAG == "off" ]; then
CONSOLE_LOGLEVEL=NONE
fi
export CONSOLE_LOGLEVEL
# source environment files
. $EDEX_HOME/etc/default.sh
if [ -e $EDEX_HOME/etc/${RUN_MODE}.sh ]; then
. $EDEX_HOME/etc/${RUN_MODE}.sh
fi
if [ $PROFILE_FLAG == "on" ]; then
. $EDEX_HOME/etc/profiler.sh
fi
# enable core dumps
#ulimit -c unlimited
# determine whether we are running a 32-bit or 64-bit version of EDEX -
# based on the AWIPS II Java that has been installed
EDEX_BITS="32"
EXPECTED_ARCH=`file ${JAVA_INSTALL}/bin/java | awk '{ print $3; }'`
if [ "${EXPECTED_ARCH}" = "64-bit" ]; then
EDEX_BITS="64"
fi
export EDEX_BITS=${EDEX_BITS}
WRAPPER_ARGS=""
if [ $DEBUG_FLAG == "on" ]; then
WRAPPER_ARGS="wrapper.java.debug.port=${EDEX_DEBUG_PORT}"
echo "To Debug ... Connect to Port: ${EDEX_DEBUG_PORT}."
fi
java -jar ${EDEX_HOME}/bin/yajsw/wrapper.jar -c ${EDEX_HOME}/conf/${CONF_FILE} ${WRAPPER_ARGS}

Some files were not shown because too many files have changed in this diff Show more