操作系统:
Redhat 6.3、Redhat6.5 、centos7.4(这些版本已验证过)
tsung版本:
tsung-1.6.0
下载地址:
链接: https://pan.baidu.com/s/1LqPsiTKEL3PLvqbDDW2vdA
提取码: y3yr
安装环境要求
已安装GCC、Perl,如未安装请查阅网上资料进行安装
GCC检测命令gcc –v,如无查询结果,正常未安装
Perl检测命令perl -MShell -e "print\"module installed\n\"",如打印出来module installed说明已安装
所需安装包
gnuplot-4.2.6-2.el6.x86_64.rpm
gnuplot-common-4.2.6-2.el6.x86_64.rpm
otp_src_17.5.tar.gz
Template-Toolkit-2.26.tar.gz
tsung-1.5.1.tar.gz
注:随着时间的推移,可能你下载的版本会比文档中描述的新
安装过程
新建/home/tsung目录,将所需安装包上传至
erlang安装
#cd /home/tsung
#tar –xzvf otp_src_17.5.tar.gz
#cd /home/tsung/otp_src_17.5
#./configure --prefix=/usr/local/erlang
#make
#make install
tsung安装
#cd /home/tsung
#tar –xzvf tsung-1.5.1.tar.gz
#cd /home/tsung/tsung-1.5.1
# ./configure --prefix=/usr/local/tsung --with-erlang=/usr/local/erlang
#make
#make install
安装perl的Template
#cd /home/tsung
#tar –zxvf Template-Toolkit-2.26.tar.gz
#cd /home/tsung/Template-Toolkit-2.26
#perl Makefile.PL
#make
#make test
#make install
安装gnuplot
首先检查系统中是否安装了此两个工具包
# rpm -qa gnuplot*
如未查询到结果,则表示未安装。
安装gnuplot
# rpm–ivh gnuplot-4.2.6-2.el6.x86_64.rpm gnuplot-common-4.2.6-2.el6.x86_64.rpm
使用介绍
/usr/local/tsung/share/doc/tsung/examples/下存放着一些常用脚本模板。
以http_simple.xml为例说明tsung使用方法。
首先,拷贝一份http_simpl.xml的副本,并进行编辑
#cd /usr/local/tsung
#cp /usr/local/tsung/share/doc/tsung/examples/http_simple.xml ./
#vim http_simple.xml
配置文件说明
运行测试脚本
#cd /usr/local/tsung
#./bin/tsung –f http_simple.xml start
生成结果报告
运行完成后,在/root/.tsung/log下会生成本次运行的日志文件。
生成统计图表
#cd /root/.tsung/log/20150510-1743
# /usr/local/tsung/lib/tsung/bin/tsung_stats.pl
生成的统计图表名为report.html,使用浏览器可以打开进行查看。
如果出现 configure: error: No curses library functions found 提示 ,需要首先安装 ncurses-devel
error: Failed dependencies:
如果安装erlang时,需要其他依赖时,可以强制忽略依赖进行安装,--force --nodeps 这块还是有问题