cosbench 是 intel 开发的对象存储服务的压测工具,从 commit 信息看,已经很久不维护了…这里先告诉大家一个坑,这里的 latest release 版本,也就是 0.4.2 部署是有问题的!!!建议大家用 v0.4.2 release candidate 4 这个版本。
按照 README,安装倒是很简单。
代码语言:javascript复制bash start-all.sh
SERVICE_NAME=driver
BOOT_LOG=log/driver-boot.log
OSGI_BUNDLES='cosbench-log_0.4.2 cosbench-tomcat_0.4.2 cosbench-config_0.4.2 cosbench-http_0.4.2 cosbench-cdmi-util_0.4.2 cosbench-core_0.4.2 cosbench-core-web_0.4.2 cosbench-api_0.4.2 cosbench-mock_0.4.2 cosbench-ampli_0.4.2 cosbench-swift_0.4.2 cosbench-keystone_0.4.2 cosbench-httpauth_0.4.2 cosbench-s3_0.4.2 cosbench-librados_0.4.2 cosbench-scality_0.4.2 cosbench-cdmi-swift_0.4.2 cosbench-cdmi-base_0.4.2 cosbench-driver_0.4.2 cosbench-driver-web_0.4.2'
OSGI_CONSOLE_PORT=18089
OSGI_CONFIG=conf/.driver
TOMCAT_CONFIG=conf/driver-tomcat-server.xml
TOOL=nc
TOOL_PARAMS=
rm -f log/driver-boot.log
mkdir -p log
echo 'Launching osgi framwork ... '
Launching osgi framwork ...
'[' 0 -ne 0 ']'
sleep 1
/usr/bin/nohup java -Dcosbench.tomcat.config=conf/driver-tomcat-server.xml -server -cp main/org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.equinox.launcher.Main -configuration conf/.driver -console 18089
echo 'Successfully launched osgi framework!'
Successfully launched osgi framework!
echo 'Booting cosbench driver ... '
Booting cosbench driver ...
succ=1
which nc
'[' 0 -ne 0 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-log_0.4.2
'[' 1 -ne 0 ']'
expr 60 - 1
attempts=59
'[' 59 -eq 0 ']'
echo -n .
. sleep 1
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-log_0.4.2
'[' 0 -ne 0 ']'
'[' 59 -ne 60 ']'
echo ''
echo 'Starting cosbench-log_0.4.2 [OK]'
Starting cosbench-log_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-tomcat_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-tomcat_0.4.2 [OK]'
Starting cosbench-tomcat_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-config_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-config_0.4.2 [OK]'
Starting cosbench-config_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-http_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-http_0.4.2 [OK]'
Starting cosbench-http_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-cdmi-util_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-cdmi-util_0.4.2 [OK]'
Starting cosbench-cdmi-util_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-core_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-core_0.4.2 [OK]'
Starting cosbench-core_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-core-web_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-core-web_0.4.2 [OK]'
Starting cosbench-core-web_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-api_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-api_0.4.2 [OK]'
Starting cosbench-api_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-mock_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-mock_0.4.2 [OK]'
Starting cosbench-mock_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-ampli_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-ampli_0.4.2 [OK]'
Starting cosbench-ampli_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-swift_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-swift_0.4.2 [OK]'
Starting cosbench-swift_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-keystone_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-keystone_0.4.2 [OK]'
Starting cosbench-keystone_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-httpauth_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-httpauth_0.4.2 [OK]'
Starting cosbench-httpauth_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-s3_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-s3_0.4.2 [OK]'
Starting cosbench-s3_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-librados_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-librados_0.4.2 [OK]'
Starting cosbench-librados_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-scality_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-scality_0.4.2 [OK]'
Starting cosbench-scality_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-cdmi-swift_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-cdmi-swift_0.4.2 [OK]'
Starting cosbench-cdmi-swift_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-cdmi-base_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-cdmi-base_0.4.2 [OK]'
Starting cosbench-cdmi-base_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-driver_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-driver_0.4.2 [OK]'
Starting cosbench-driver_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 18089
grep cosbench-driver-web_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-driver-web_0.4.2 [OK]'
Starting cosbench-driver-web_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
'[' 1 -eq 0 ']'
'[' 1 -eq 1 ']'
echo 'Successfully started cosbench driver!'
Successfully started cosbench driver!
cat log/driver-boot.log
Listening on port 0.0.0.0/0.0.0.0:18089 ...
Persistence bundle starting...
Persistence bundle started.
----------------------------------------------
!!! Service will listen on web port: 18088 !!!
----------------------------------------------
exit 0
======================================================
SERVICE_NAME=controller
BOOT_LOG=log/controller-boot.log
OSGI_BUNDLES='cosbench-log_0.4.2 cosbench-tomcat_0.4.2 cosbench-config_0.4.2 cosbench-core_0.4.2 cosbench-core-web_0.4.2 cosbench-controller_0.4.2 cosbench-controller-web_0.4.2'
OSGI_CONSOLE_PORT=19089
OSGI_CONFIG=conf/.controller
TOMCAT_CONFIG=conf/controller-tomcat-server.xml
TOOL=nc
TOOL_PARAMS=
rm -f log/controller-boot.log
mkdir -p log
echo 'Launching osgi framwork ... '
Launching osgi framwork ...
'[' 0 -ne 0 ']'
sleep 1
/usr/bin/nohup java -Dcosbench.tomcat.config=conf/controller-tomcat-server.xml -server -cp main/org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.equinox.launcher.Main -configuration conf/.controller -console 19089
echo 'Successfully launched osgi framework!'
Successfully launched osgi framework!
echo 'Booting cosbench controller ... '
Booting cosbench controller ...
succ=1
which nc
'[' 0 -ne 0 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-log_0.4.2
'[' 1 -ne 0 ']'
expr 60 - 1
attempts=59
'[' 59 -eq 0 ']'
echo -n .
. sleep 1
'[' 0 -ne 1 ']'
nc 0.0.0.0 19089
grep cosbench-log_0.4.2
echo 'ss -s ACTIVE cosbench'
'[' 0 -ne 0 ']'
'[' 59 -ne 60 ']'
echo ''
echo 'Starting cosbench-log_0.4.2 [OK]'
Starting cosbench-log_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-tomcat_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-tomcat_0.4.2 [OK]'
Starting cosbench-tomcat_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-config_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-config_0.4.2 [OK]'
Starting cosbench-config_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-core_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-core_0.4.2 [OK]'
Starting cosbench-core_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-core-web_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-core-web_0.4.2 [OK]'
Starting cosbench-core-web_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-controller_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-controller_0.4.2 [OK]'
Starting cosbench-controller_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
for module in '$OSGI_BUNDLES'
ready=0
attempts=60
'[' 0 -ne 1 ']'
echo 'ss -s ACTIVE cosbench'
nc 0.0.0.0 19089
grep cosbench-controller-web_0.4.2
'[' 0 -ne 0 ']'
'[' 60 -ne 60 ']'
echo 'Starting cosbench-controller-web_0.4.2 [OK]'
Starting cosbench-controller-web_0.4.2 [OK]
ready=1
'[' 1 -ne 1 ']'
'[' 1 -eq 0 ']'
'[' 1 -eq 1 ']'
echo 'Successfully started cosbench controller!'
Successfully started cosbench controller!
cat log/controller-boot.log
Listening on port 0.0.0.0/0.0.0.0:19089 ...
Persistence bundle starting...
Persistence bundle started.
----------------------------------------------
!!! Service will listen on web port: 19088 !!!
----------------------------------------------
exit 0