sipp 对asterisk 进行压力测试
测试环境
asterisk 192.168.106.170
版本astrisk1.8
sipp 192.168.106.141
sipp版本3.3
安装依赖包
yum install make gcc gcc-c++ ncurses ncurses.x86_64 ncurses-devel ncurses-devel.x86_64 openssl libnet libpcap libpcap-devel libpcap.x86_64 libpcap-devel.x86_64 gsl gsl-devel
asterisk配置
sip.conf
[general]
context=default
allowoverlap=no
allowguest=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
language=cn
callevents=yes
limitonpeers=no
jbenable=yes [sipp] host=192.168.106.141
type=friend disallow=all
allow=g729
allow=g723
allow=ulaw
allow=alaw
context=sipp
extension.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no [globals] [sipp]
exten => ,,Answer
exten => ,,SetMusicOnHold(default)
exten => ,,WaitMusicOnHold()
exten => ,,Hangup
sipp客户端配置
uac-media.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd"> <!-- This program is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU General Public License as -->
<!-- published by the Free Software Foundation; either version of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
<!-- GNU General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License -->
<!-- along with this program; if not, write to the -->
<!-- Free Software Foundation, Inc., -->
<!-- Temple Place, Suite , Boston, MA - USA -->
<!-- -->
<!-- Sipp 'uac' scenario with pcap (rtp) play -->
<!-- --> <scenario name="Basic Sipstone UAC">
<!-- In client mode (sipp placing calls), the Call-ID MUST be -->
<!-- generated by sipp. To do so, use [call_id] keyword. -->
<send retrans="">
<![CDATA[ INVITE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp<sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut<sip:[field1]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: INVITE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len] v=
o=user1 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[local_ip_type] [local_ip]
t=
m=audio [media_port] RTP/AVP
a=rtpmap: G729 ]]>
</send> <recv response=""
optional="true">
</recv> <!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="" rtd="true">
</recv> <!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [-] percent. -->
<send>
<![CDATA[ ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Length:
]]>
</send> <!-- Play a pre-recorded PCAP file (RTP stream) -->
<nop>
<action>
<exec play_pcap_audio="pcap/g711a.pcap"/>
</action>
</nop> <!-- Pause seconds, which is approximately the duration of the -->
<!-- PCAP file -->
<pause milliseconds=""/> <!--This delay can be customized by the -d command-line option -->
<!--or by adding a'milliseconds = "value" option here -->
<pause/> <!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send retrans="">
<![CDATA[ BYE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: BYE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Length:
]]>
</send> <recv response="" crlf="true">
</recv> <!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> <!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> </scenario>
44.csv
SEQUENTIAL
;;[authentication username= password=]
之后执行命令
./sipp -sf uac-media.xml -inf .csv -p -i 192.168.106.141 -m 192.168.106.170 -l
显示
Last Error: Aborting call on UDP retransmission timeout for Call-ID '281...
------------------------------ Scenario Screen -------- [-]: Change Screen --
Call-rate(length) Port Total-time Total-calls Remote-host
10.0( ms)/.000s 313.57 s 192.168.106.170:(UDP) new calls during 0.952 s period ms scheduler resolution
calls (limit ) Peak was calls, after s
Running, Paused, Woken up
dead call msg (discarded) out-of-call msg (discarded)
open sockets Messages Retrans Timeout Unexpected-Msg
INVITE ---------->
<----------
<---------- E-RTD1
ACK ---------->
Pause [ :]
Pause [ 0ms]
BYE ---------->
<---------- ------------------------------ Test Terminated --------------------------------
asterisk服务器显示
SIP/sipp-00000cb7 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a18 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb4 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3e @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb5 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3d @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab4 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb2 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab5 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb3 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3f @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab6 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb0 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3a @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab7 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb1 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab0 @sipp: Up WaitMusicOnHold()
active channels
active calls
calls processed
[root@test asterisk]# asterisk -rx"core show channels"
Can't create thread to send RTP packets,翻译过来就是“无法创建线程发送RTP数据包”
大概知道是需要设置ulimit ,但设置好像没有生效。在龙舟兄弟的指导与提醒下,索性直接ulimit -s unlimited,设置为不限制了。
如此之后,rtp就不受限制了。
xml实例文件
https://github.com/saghul/sipp-scenarios
sipp 对asterisk 进行压力测试的更多相关文章
- 使用SwingBench 对Oracle RAC DB性能 压力测试
我们可以使用swingbench这个工具对数据库性能进行压力测试,得到一些性能指标作为参考. SwingBench下载: http://www.dominicgiles.com/downloads.h ...
- linux压力测试工具stress
最近给PASS平台添加autoscaling的功能,根据服务器的负载情况autoscaling,为了测试这项功能用到了stress这个压力测试工具,这个工具相当好用了.具体安装方式就不说了.记录下这个 ...
- JMeter压力测试
Apache JMeter是Apache组织开发的基于Java的压力测试工具.用于对软件做压力测试,它最初被设计用于Web应用测试但后来扩展到其他测试领域. 它可以用于测试静态和动态资源例如静态文件. ...
- kafka性能参数和压力测试揭秘
转自:http://blog.csdn.net/stark_summer/article/details/50203133 上一篇文章介绍了Kafka在设计上是如何来保证高时效.大吞吐量的,主要的内容 ...
- 开发 ASP.NET vNext 续篇:云优化的概念、Entity Framework 7.0、简单吞吐量压力测试
继续上一篇<开发 ASP.NET vNext 初步总结(使用Visual Studio 2014 CTP1)>之后, 关于云优化和版本控制: 我本想做一下MAC和LINUX的self-ho ...
- Jmeter教程 简单的压力测试
Jmeter教程 简单的压力测试:http://www.cnblogs.com/TankXiao/p/4059378.html
- HTTP压力测试工具
HttpTest4Net是一款基于C#实现的和HTTP压力测试工具,通过工具可以简单地对HTTP服务进行一个压力测试.虽然VS.NET也集成了压力测试项目,但由于VS自身占用的资源导致了在配置不高的P ...
- 微软压力测试工具 web application stress
转自 http://www.cnblogs.com/tonykan/p/3514749.html lbimba 铜牌会员 这里给广大的煤油推荐一个web网站压力测试工具.它可以用来模拟多个用户操作网 ...
- 使用Microsoft Web Application Stress Tool对web进行压力测试
Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法.Web 压力测试通常是利用一些工具,例如微软 ...
随机推荐
- 【jQuery】方法和选择器的双重使用详解
1.jQuery选择直接子节点+除了某个元素 1>方法 $(".begon").children(".row:not(.moreDetail)") 2&g ...
- nexus启动报错----->错误 1067: 进程意外终止。
1.今天启动nexus报错: 2.错误信息 错误 1067: 进程意外终止. 3.检查发现我之前把jdk升级了. 然而nexus之前指定的jdk将不再生效. 4.解决的方法 找到nexus安装文件夹 ...
- npm 安装包无法继续下载? 卡住
一般是由于package.json配置的项目名不对
- PPAPI插件的动态创建、改动、删除
一旦你完毕了PPAPI插件的开发,实际使用时可能会有下列需求: 动态创建PPAPI插件 删除PPAPI插件 改变PPAPI插件的尺寸 实现起来非常easy,从JS里直接訪问DOM(BOM)就可以.以下 ...
- MySQL获得指定数据表中auto_increment自增id值的方法及实例
http://kb.cnblogs.com/a/2357592/很多情况下,我们要提前用到当前某个表的auto_increment自增列id,可以通过执行sql语句来查询到这个id值. show ta ...
- docker安全最佳实践概述
/************************************************* * Author : Samson * Date : 08/07/2015 * Test plat ...
- inch mil mm换算
inch:英寸 mil:密耳 mm:毫米 1mil=0.0254mm=25.4um 1mm=39.37mil 1inch=1000mil=25.4mm
- B树的生成
B树的生成 flyfish 2015-7-19 从空树開始构建一棵B树 逐个插入keyword 规则: 除根结点之外的全部非终端结点至少有⌈m/2⌉棵子树,所以keyword的个数必须 n为keywo ...
- IDEA搭建Android wear开发环境,Android wear,I'm comming!
随着google公布了android wear这个东西.然后又有了三星的gear,LG的G watch以及moto 360,苹果由公布了apple watch.未来可能在智能手表行业又有一场战争. 当 ...
- 深度解析开发项目之 03 - enum的使用
深度解析开发项目之 03 - enum的使用 01 - 在#import和@interface之间定义typedef enum 注意: 默认是0,1,2,3 02 - 定义可以操作的数据类型的属性 0 ...