---
title: 安装测试工具
description: "COSBench组件分布请见表1。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengsdss/testGuide/tstg/ceph-dxcc_cszd_005.html
sourcePath: /source/zh/kunpengsdss/testGuide/tstg/ceph-dxcc_cszd_005.html
indexId: abed4bb5d87c409b2eb2b8e26fa9cbda2a9499be588fe7f85697aa336b9f2fcb61
---
# 安装测试工具

#### COSBench组件分布

COSBench组件分布请见表1。


**表1 COSBench组件分布**

| 客户端主机名 | COSBench Controller | COSBench Driver | 备注 |
| --- | --- | --- | --- |
| client1 | controller\*1 | driver\*N | N为客户端运行的COSBench Driver数量，本文为20 |


#### 启动COSBench

COSBench需要分别启动Driver和Controller组件。

1. 下载COSBench压缩包，放到所有客户端的“/home”目录下。
  获取链接(https://github.com/intel-cloud/cosbench/releases/download/v0.4.2.c4/0.4.2.c4.zip)

2. 在所有客户端安装依赖。
  1 yum -y install java curl

3. 在所有客户端解压并进入解压后的目录。
  1 unzip /home/0.4.2.c4.zip && cd /home/0.4.2.c4/

4. 所有客户端启动COSBench Driver，每台启动20个Driver。
  1 sh start-driver.sh 20 127.0.0.1 19188

  上述命令中： 20表示启动20个Driver。 127.0.0.1表示在本机启动。 19188表示Driver端口号，端口号从19188开始以100递增。

5. 修改controller.conf文件。

  a. 打开conf/controller.conf文件。
    1 vi conf/controller.conf

  b. 按“i”进入编辑模式，参考如下信息修改文件内容。
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 [controller] drivers = 20 log_level = INFO log_file = log/system.log archive_dir = archive [driver1] name = driver1 url = http://192.168.3.194:19188/driver [driver2] name = driver2 url = http://192.168.3.194:19288/driver [driver3] name = driver3 url = http://192.168.3.194:19388/driver [driver4] name = driver4 url = http://192.168.3.194:19488/driver [driver5] name = driver5 url = http://192.168.3.194:19588/driver [driver6] name = driver6 url = http://192.168.3.194:19688/driver [driver7] name = driver7 url = http://192.168.3.194:19788/driver [driver8] name = driver8 url = http://192.168.3.194:19888/driver [driver9] name = driver9 url = http://192.168.3.194:19988/driver [driver10] name = driver10 url = http://192.168.3.194:20088/driver [driver11] name = driver11 url = http://192.168.3.194:20188/driver [driver12] name = driver12 url = http://192.168.3.194:20288/driver [driver13] name = driver13 url = http://192.168.3.194:20388/driver [driver14] name = driver14 url = http://192.168.3.194:20488/driver [driver15] name = driver15 url = http://192.168.3.194:20588/driver [driver16] name = driver16 url = http://192.168.3.194:20688/driver [driver17] name = driver17 url = http://192.168.3.194:20788/driver [driver18] name = driver18 url = http://192.168.3.194:20888/driver [driver19] name = driver19 url = http://192.168.3.194:20988/driver [driver20] name = driver20 url = http://192.168.3.194:21088/driver

  c. 修改完成后，按“Esc”键退出编辑模式，输入:wq!，按“Enter”键保存退出文件。
客户端已启动COSBench Controller，20个COSBench Driver。
上述配置文件controller.conf中：

- drivers = 20表示该Controller控制客户端上20个Driver，在下面加上20个Driver的IP地址和端口号。
- 192.168.3.194是客户端的IP地址。


6. 在所有客户端取消proxy设置。
  1 unset http_proxy && unset https_proxy

7. 在客户端COSBench Controller节点上启动Controller。
  1 sh start-controller.sh

8. 检查COSBench是否启动成功。
  打开浏览器访问Controller节点http://<cosbench-controller-IP>:<controller-port>/controller/index.html，如果出现以下页面，则表示COSBench启动成功。
