tsung 安装及测试使用
来源:互联网 发布:刷黄钻软件手机版 编辑:程序博客网 时间:2024/05/29 05:04
1.下载/otp_src_R16B.tar.gz http://erlang.org/download/otp_src_R16B.tar.gz
安装otp_src_R15B
在apps下建tsung 把otp_src_R15B.tar.gz放入修改权限755
使用tar -zvxf otp_src_R15B.tar.gz解压
进入cd otp_src_R15B目录下
使用命令 ./configure --prefix=/usr/local/erlang
如果出现 configure: error: No curses library functions found
使用命令安装 rpm -ivh ncurses-devel-5.7-4.20090207.el6.x86_64.rpm
在运行 ./configure --prefix=/usr/local/erlang
出现
使用make && make install
设置环境变量以便下一步安装Tsung时使用
[root@tester~]#export PATH=$PATH:/usr/local/erlang/bin/
验证erlang是否安装成功
[root@tester~]#erl 测试是否成功
2.安装gnuplot-5.0.6.tar.gz
放在tsung下,使用tar -zvxf gnuplot-5.0.6.tar.gz解压
进入cd gnuplot-5.0.6目录下
使用命令 ./configure --prefix=/usr/local/gnuplot
使用make && make install
设置环境变量以便下一步安装Tsung时使用
[root@tester~]#export PATH=$PATH:/usr/local/gnuplot/bin/
验证gnuplot是否安装成功
[root@tester~]#gnuplot 测试是否成功
3.安装tsung-1.6.0.tar.gz
放入tsung下,该权限chmod 755 tsung-1.6.0.tar.gz
使用tar –zvxf tsung-1.6.0.tar.gz解压
进入cd tsung-1.6.0目录下
使用命令./configure --prefix=/usr/local/tsung
使用make && make install
设置环境变量以便下一步安装Tsung时使用
[root@tester~]#export PATH=$PATH:/usr/local/tsung/bin/
验证gnuplot是否安装成功
[root@tester~]#tsung 测试是否成功
如果一直出现Error while running gnuplot: 对设备不适当的 ioctl 操作 at /usr/local/tsung/lib/tsung/bin/tsung_stats.pl line 255.
则删除下载的gnuplot包 安装系统原有的gnuplot包
如果一直出现Error while running gnuplot: 对设备不适当的 ioctl 操作 at /usr/local/tsung/lib/tsung/bin/tsung_stats.pl line 255. Can't locate Template.pm in @INC 是没安装Template
安装perl的Template
# tar -zxvf Template-Toolkit-2.22.tar.gz
# cd Template-Toolkit-2.22
# perl Makefile.PL
# make
# make test
# make install
配置环境变量
进入cd /etc/profile
REPORT_HOME=/usr/local/lib/tsung/bin
ERLANG_HOME=/usr/local/erlang/bin
GNUPLOT_HOME=/usr/local/gnuplot/bin
TSUNG_HOME=/usr/local/tsung/bin
PATH=$PATH:$ERLANG_HOME:$GNUPLOT_HOME:$TSUNG_HOME:$REPORT_HOME
export PATH
使用source /etc/profile让配置生效
4.测试
使用cd /usr/local/tsung/share/doc/tsung/examples进入tsung列子
拷贝cp http_simple.xml ~/.tsung/tsung.xml
进入cd ~/.tsung/tsung.xml
编辑 vi tsung.xml
主要的配置有
<clients>
<client host="localhost" use_controller_vm="true"/>
</clients>
<!-- Server side setup -->
<servers>
<server host="192.168.0.168" port="8080" type="tcp"></server> <!-- 想要访问的项目的IP地址,端口号 -->
</servers>
<!-- to start os monitoring (cpu, network, memory). Use an erlang
agent on the remote machine or SNMP. erlang is the default -->
<monitoring>
<monitor host="hank" type="erlang"></monitor> <!--测试机的主机名,语言使用erlang-->
</monitoring>
<load>
<!-- several arrival phases can be set: for each phase, you can set
the mean inter-arrival time between new clients and the phase
duration -->
<arrivalphase phase="1" duration="30" unit="second"> <!-- 一阶段 总运行时间30秒-->
<users interarrival="0.02" unit="second"></users> <!-- 每秒生成50个虚拟用户-->
</arrivalphase>
</load>
我使用get和post测试成功,脚本录制后tsung_recorder stop会提示我没有运行 tsung recorder总是不成功,谁知道了可以告诉我,多谢了
<sessions>
<session name="http-example" probability="100" type="ts_http">
<request> <http url="http://192.168.0.168:8080/GeekOA/user/login?username=TD007&password=081137" method="GET" version="1.1"></http> </request>
<request> <http url="http://192.168.0.168:8080/GeekOA/user/login" contents="username=1&password=123" method="POST" version="1.1"></http> </request>
</session>
</sessions>
都是登陆,看你想用哪个了
使用tsung start启动 完成后会生成一日期名字的文件夹会在命令行中显示出来如 20170408-1446
然后你可以通过看控制台或者tomcat有没有打印一些语句判断是否成功
当然也可以先生成报告在判断是否成功
使用 cd ~/.tsung/log/20170408-1446/进入
使用命令/usr/local/tsung/lib/tsung/bin/tsung_stats.pl生成报告会出现以下信息
[root@hank ]# cd ~/.tsung/log/20170408-1446/
[root@hank 20170408-1446]# /usr/local/tsung/lib/tsung/bin/tsung_stats.pl
warn, last interval (5) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
No data for Errors
报告生成成功,把20170408-1446拷贝到windows下打开report.html
查看Counters Statistics 查看connected,比如我这里显示了528次就是我的登录进行 了500多次,查看HTTP return code返回的是否是200,200则成功
- tsung 安装及测试使用
- 压力测试工具Tsung安装和使用
- 压力测试工具Tsung安装和使用
- tsung安装测试
- tsung安装使用
- tsung 安装和测试注册
- 使用Tsung测试Openfire服务器
- tsung的安装和使用
- Tsung的安装和使用
- 分布式负载测试工具Tsung安装
- Linux Tsung压力测试安装说明
- Linux Tsung压力测试安装说明
- 1. 使用tsung测试openfire服务器
- mac系统 使用tsung测试openfire服务器
- CentOS压力测试工具Tsung安装、使用和图形报表生成
- CentOS压力测试工具Tsung安装、使用和图形报表生成
- CentOS压力测试工具Tsung安装和使用和图形报表生成
- CentOS压力测试工具Tsung安装、使用和图形报表生成
- HighChart(二)图表自适应容器
- The Amazon CEO and founder published his annual letter to shareholders on Wednesday and gave a detai
- google tag manager的使用
- 欢迎使用CSDN-markdown编辑器
- 两张图 两句话彻底搞懂 js中的this 作用域 原型链
- tsung 安装及测试使用
- Android 65535问题解决方法之不分包只删除jar包无用依赖
- C++ 函数模板小结
- 吊炸天!74款APP完整源码!
- Java开发中的23种设计模式详解(转)
- Deep Learning 中文翻译
- MyBatis的collection和association
- spring_01<bean>的两种注入方式
- R全面解析Mahout的基于用户推荐协同过滤算