一、工具下载&&安装 
软件获取 
ftp://ftp.hpl.hp.com/pub/httperf/ 
这里使用的是如下的版本 
ftp://ftp.hpl.hp.com/pub/httperf/httperf-0.9.0.tar.gz 
软件安装 
# ls httperf-0.9.0.tar.gz  
httperf-0.9.0.tar.gz 
#tar zxvf httperf-0.9.0.tar.gz  && cd httperf-0.9.0 &&https://www.cnblogs.com/kcxg/p/configure  --prefix=/usr/local/tools && make && make install 
 
二、开始压力测试 
 
[root@localhost bin]# https://www.cnblogs.com/kcxg/p/httperf --client=0/1 --server www.ethnicity.cn --port80 --uri /index.html --rate 100 --num-conn 300 --num-call 5 --timeout 5 

• --client=I/N 指定当前客户端I,是N个客户端中的第几个。用于多个客户端发请求,希望确保每个客户端发的请求不是完全一致。一般不用指定
• --server 所测试的的网站名(主机名,域名或者ip地址)
• --uri 指定的下载文件
• --rate  每秒发送的请求
• --num-conn 连接的总数
• --num-call 每个连接发送的请求数目
• --timeout 超时时间
httperf --timeout=5 --client=0/1--server=www.ethnicity.cn --port=80 --uri=/index.html --rate=100 --send-buffer=4096--recv-buffer=16384 --num-conns=300 --num-calls=5 
Maximum connect burst length: 13