sipp测试
-
安装sipp
-
环境
- centos7.9
- cmake3.6
- sipp v3.6.1
-
安装cmake(centos7默认的cmake版本过低)
yum install -y gcc gcc-c++ make automake
yum install -y wget
tar -zxvf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./bootstrap
make -j4
make install
ln -s /usr/local/bin/cmake /usr/bin/cmake -
安装sipp
yum list lksctp*
yum install lksctp-tools-devel
github下载sipp3.6.1
cd sipp
yum install ncurses-devel
rm -rf CMakeCache.txt
cmake . -DUSE_SSL=1 -DUSE_SCTP=1 -DUSE_PCAP=1 -DUSE_GSL=1
yum makecache
-
安装libpcap
-
centos7
yum -y install libpcap-devel
-
centos8
yum -y install dnf
dnf config-manager –add-repo /etc/yum.repos.d/CentOS-PowerTools.repo //添加powertools源
dnf config-manager –set-enabled PowerTools //启用powertools源
dnf install epel-release -y //安装epel源
dnf install libpcap-devel -y //安装libpcap-devel包
-
yum -v install openssl-devel
make
make install
ln -s /usr/local/bin/sipp /usr/bin/sipp
sipp -v
-
-
-
sipp测试
-
测试用例以及参数说明
Sipp内置了两个脚本,服务器脚本(UAS)和客户端脚本(UAC),可以在同一台设备或者不通的设备上运行UAS 和UAC脚本以示范sipp的能力。若要运行自己定义的xml文件,在使用的时候不要带sipp内置的脚本,既-sn uac和-sn uas不要添加
-
SIPP配置参数详解
-i 本地地址
-sf 加载外部的xml定义文件,即指定使用的场景文件
-inf 从外部csv文件导入数据信息,Csv文件可以使用预制好的号码变量,减轻工作量
-p 指定本地端口。如果不指定的话,系统使用一个随机的空闲端口
-m 指定测试的呼叫总数,当达到m指定的数目时候停止呼叫,程序结束
-r 指定每秒发起呼叫数(如果指定参数-rp则即为-rp所指定的时间内发起的呼叫数)
-d 每个呼叫的保持时间(毫秒)
-s 被叫号码
-sn 指定sipp启动的是uas服务既服务器端。
-sn uac 执行默认的uac流程
-l 最大同时保持呼叫量,当因种种原因导致现存呼叫总数达到此值时,SIPp将停止产生新的呼叫,等待现存呼叫总数低于此值时才继续产生呼叫。
-trace_err 跟踪所有错误消息,并把错误消息保存到文件场景文件描述的__errors.log文件中 -
呼叫性能测试
-
客户端
-
./sipp -s -l -r -sn uac
例如
./sipp -s 9000 -l 30 -r 400 -sn uac 172.16.1.88
-
./sipp -i -s -l -r -sn uac
例如
./sipp -i 172.16.5.142 -s 9000 -l 30 -r 400 -sn uac 172.16.1.88
-
-
服务器端命令
-
./sipp -s -p -sn uas
例如
./sipp -s 9000 -p 5061 -sn uas
-
./sipp -i -s -p -sn uas
例如
./sipp -i 172.16.5.142 -s 9000 -p 5061 -sn uas
-
-
-
媒体测试
-
客户端
-
./sipp -sf uac_pcap.xml -i -s -l -r -mi -mp
例如
./sipp -sf uac_pcap.xml -i 172.16.5.142 -s 9000 172.16.1.88 -l 20 -r 400 -mi 172.16.1.106 -mp 10000
-
-
服务器端命令
-
./sipp -i -s -p -mi -rtp_echo -sn uas
例如
./sipp -i 172.16.5.142 -s 9000 -p 5061 -mi 172.16.5.142 -rtp_echo -sn uas
或者
./sipp -sf uas.xml -i 172.16.5.142 -s 9000 -p 5061 -mi 172.16.5.142 -rtp_echo
-
-
-
住注册功能测试
./sipp -sf reg.xml -inf reg1.csv -p -i -l -r
例如
./sipp -sf reg.xml -inf reg1.csv -p 6067 -i 172.16.5.142 -l 4000 -r 4000 172.16.1.88
-