yum install texinfo
yum install gnuplot
#下载 http://httperf.googlecode.com/files/httperf-0.9.0.tar.gz
tar zfvx httperf-0.9.0.tar.gz
./configure
make && make install
# 下载 Autobench
wget https://github.com/menavaur/Autobench/archive/master.zip
mv master.zip autobench.zip
unzip autobench.zip
cd Autobench-master
make && make install
cp /usr/local/bin/bench2graph /usr/local/bin/bench2png
sed -i 's/postscript color/png xffffff/g' /usr/local/bin/bench2png
# 生成测试文件
/usr/local/bin/autobench --single_host \
--host1 192.168.0.2 --port1 80 --uri1 /index/test \
--quiet --low_rate 10 --high_rate 100 --rate_step 10 \
--num_call 1 --num_conn=100 --timeout=10 \
--file result.tsv
#参数含义
--signle_host 只测单机
--host1 主机地址
--port1 端口
--uri1 测试URI
--quiet 安静模式
--low_rate 测试时最低请求数
--hight_rate 测试时最高请求数
--rate_step 每次测试请求数增加步长
--num-call 同httperf [创建连接数]
--num_conn 同httperf [每个连接发送多少请求]
--timeout 链接超时
--file 测试结果输出的 tsv文件
# 把测试文件转图
bench2png results.tsv results.png
# ERROR: Could not find/open font when opening font "arial",
wget ftp://ftp.pbone.net/mirror/olea.org/msttcore-fonts-2.0-6.noarch.rpm
rpm -ivh msttcore-fonts-2.0-6.noarch.rpm
export GDFONTPATH="/usr/share/fonts/msttcore"
export GNUPLOT_DEFAULT_GDFONT="arial"