generate the call load file
#!/usr/bin/perl -w
$e911_call_percent = 0.0;
$ims_node_number = 12;
$local_ip = "10.86.52.2";
$local_port_base = 18000;
$media_port_base = 19000;
$SIPP_BIN="/home/lss/QCBCb/bin/sipp";
$SCRIPT_DIR="../xml";
$DATA_DIR="./data";
$ue_dn_base = 6460000000;
$pstn_dn_base = 8460000000;
$u2u_num = 2450;
$u2u_cps = 12.36;
$u2p_num = $u2u_num * 2;
$u2p_cps = $u2u_cps * 2;
$p2u_num = $u2u_num * 2;
$p2u_cps = $u2u_cps * 2;
$reg_num = 96450;
$reg_rps = 30.88;
$total_sub_one_ims = 130000;
$domain = "qcbcb.qd.lucentlab.com";
$passwd = "newsys";
$local_zone = "qcbcb.qd.lucentlab.com";
$icsf_gul = "icsf-stdn";
$ip_first_byte = 40;
@remote_publish_ip_port =
(
"135.251.158.17:5060",
"135.251.158.18:5060",
"135.251.158.19:5060",
"135.251.158.20:5060",
"135.251.158.21:5060",
"135.251.158.22:5060",
"135.251.158.23:5060",
"135.251.158.24:5060",
"135.251.158.25:5060",
"135.251.158.26:5060",
"135.251.158.27:5060",
"135.251.158.28:5060",
);
@remote_default_ip_port =
(
"135.251.158.17:5060",
"135.251.158.18:5060",
"135.251.158.19:5060",
"135.251.158.20:5060",
"135.251.158.21:5060",
"135.251.158.22:5060",
"135.251.158.23:5060",
"135.251.158.24:5060",
"135.251.158.25:5060",
"135.251.158.26:5060",
"135.251.158.27:5060",
"135.251.158.28:5060",
);
$ue_reg_script = "$SCRIPT_DIR/UAS/uas_reg_97k.xml";
$ue_uac_reg_script = "$SCRIPT_DIR/UAC/uac_reg_SNCalls";
$ue_uac_call_script = "$SCRIPT_DIR/UAC/uac";
$ue_uas_reg_script = "$SCRIPT_DIR/UAS/uas_reg_SNCalls";
$ue_uas_call_script = "$SCRIPT_DIR/UAS/uas";
$mgcf_uac_script = "$SCRIPT_DIR/MGCF/mgcf-uac.xml";
$mgcf_uas_script = "$SCRIPT_DIR/MGCF/mgcf-uas.xml";
sub gen_data_file
{
my($dir, $filename, $caller_start, $callee_start, $num, $IP1, $IP2) = @_;
print "$dir, $filename, $caller_start, $callee_start, $num, $IP1, $IP2\n";
if($num <= 0)
{
printf "skip data file generation\n";
return;
mkdir "$dir/data";
open(FD, "> $dir/data/${filename}_datafile");
print FD "SEQUENTIAL\n";
print FD "# USER; AUTHENTICATION; local Port; Media Port\n";
my $generate_e911 = 0;
if($e911_call_percent != 0 && $filename =~ /uepstn/)
{
printf "UE2PSTN, and generate e911 number is enabled\n";
$generate_e911 = 1;
}
for (my $i = 0; $i < $num; $i++)
$callee = $callee_start + $i;
$port = $i + 1;
$x = int($i / 256 / 256);
if($generate_e911 == 1)
{
my $rand = rand(10000);
$callee = 911;
}
}
}
close (FD);
}
{
my($pool, $dir) = @_;
my $lu_dn_base = $ue_dn_base + $pool*$total_sub_one_ims;
my $lp_dn_base = $pstn_dn_base + $pool*$total_sub_one_ims;
my $caller_start = $lu_dn_base;
my $callee_start = $lu_dn_base + $u2u_num;
$ip_first_byte += 2;
$caller_start = $lu_dn_base + $u2u_num*2;
$callee_start = $lp_dn_base + $u2u_num*2;
$ip_first_byte += 2;
$caller_start = $lp_dn_base + $u2u_num*2 + $u2p_num;
$ip_first_byte += 2;
open (FD, "> $dir/data/mgcf_p2u_data.orig");
printf FD ("SEQUENTIAL,PRINTF=%d,PRINTFOFFSET=%d\n", $p2u_num, $callee_start%10000000);
printf FD ("1%d%%0.7d;%s;%s;%s", ($ue_dn_base/10000000), $domain, $local_zone, $icsf_gul);
close (FD);
$callee_start = $lu_dn_base + $u2u_num*2 + $u2p_num + $p2u_num;
$ip_first_byte += 1;
}
sub gen_cmd_one_grp_tp1
{
my($pool, $dir) = @_;
$REMOTE_PUBLISH_IP = $remote_publish_ip_port[$pool];
$REMOTE_DEFAULT_IP = $remote_default_ip_port[$pool];
$LOCAL_IP = $local_ip;
print "gen_cmd_one_grp: $REMOTE_PUBLISH_IP/$REMOTE_DEFAULT_IP\n";
$REG_UAS_PORT = $local_port_base + $pool*10 + 7;
$REG_RPS = $reg_rps;
$REG_LMT = $reg_num;
$U2U_ORIG_MEDIA_PORT = $media_port_base;
$U2U_TERM_MEDIA_PORT = $media_port_base + 5;
$U2P_ORIG_MEDIA_PORT = $media_port_base + 10;
$U2P_TERM_MEDIA_PORT = $media_port_base + 15;
{
open (FD, ">$dir/ueueorig");
print FD "sleep \$1\n";
close (FD);
open (FD, ">$dir/ueueterm");
print FD "sleep \$1\n";
close (FD);
}
close (FD);
close (FD);
}
if($P2U_CPS * $P2U_MAX > 0)
{
open (FD, ">$dir/mgcf_p2u_uac");
print FD "sleep \$1\n";
close (FD);
open (FD, ">$dir/pstnueterm");
print FD "sleep \$1\n";
close (FD);
}
if($REG_RPS * $REG_LMT > 0)
{
open (FD, ">$dir/regs");
print FD "sleep \$1\n";
close (FD);
}
open (FD, ">$dir/autorun");
$term_offset = ($pool%2)*600;
print FD 'gnome-terminal --geometry=' . "80x46+$term_offset+0" . ' \
--tab --title=u2u_term --working-directory=`pwd` -e "./ueueterm 0" \
--tab --title=p2u_term --working-directory=`pwd` -e "./pstnueterm 0" \
--tab --title=u2p_term --working-directory=`pwd` -e "./mgcf_u2p_uas 0" \
--tab --title=u2u_orig --working-directory=`pwd` -e "./ueueorig 300" \
--tab --title=p2u_orig --working-directory=`pwd` -e "./mgcf_p2u_uac 300" \
--tab --title=u2p_orig --working-directory=`pwd` -e "./uepstnorig 300" \
--tab --title=reg --working-directory=`pwd` -e "./regs 300"';
close (FD);
system ("chmod 755 $dir/*");
}
sub gen_sipp_one_grp
{
my($pool) = @_;
$dir = sprintf "grp%03d", $pool;
printf "\n>>> generate sipp for ims pool $pool now...\n";
mkdir $dir;
gen_datafile_one_grp_tp1($pool, $dir);
gen_cmd_one_grp_tp1($pool, $dir);
}
for(my $pool=0; $pool<$ims_node_number; $pool++)
{
gen_sipp_one_grp $pool;
}
print "Done!\n";
generate the call load file的更多相关文章
- error_Could not load file or assembly
原文链接 Could you be missing the loaded assembly from your configuration file? Ensure you have somethin ...
- configuration error-could not load file or assembly crystaldecisions.reportappserver.clientdoc
IIS启动网站后报错: configuration error Could not load file or assembly 'crystaldecisions.reportappserver.cl ...
- Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its de
页面加载时出现这个错误: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cul ...
- Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting'.系统找不到指定文件
项目部署到服务器后出现如下错误信息: Parser Error Message: Could not load file or assembly 'System.ServiceModel.Domain ...
- ASP.NET corrupt assembly “Could not load file or assembly App_Web_*
以下是从overFlow 复制过来的问题 I've read through many of the other questions posted on the same issue, but I s ...
- Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0 系统找不到指定的文件。
环境: web服务器: ip:192.168.1.32 ,安装有 Visual Studio Premium 2013 操作系统: Microsoft Server 2008 r2+sp1 数据库服 ...
- NopCommerce 发布时 Could not load file or assembly 'file:///...\Autofac.3.5.2\lib\net40\Autofac.dll' or one of its dependencies
本文转自:http://www.nopcommerce.com/boards/t/33637/4-errors.aspx 问题: The 3.5 solution compiles fine, and ...
- Could not load file or assembly 'MySql.Data.CF,
Could not load file or assembly 'MySql.Data.CF, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c56 ...
- Could not load file or assembly 'System.Data.SQLite' or one of its dependencies
试图加载格式不正确的程 异常类型 异常消息Could not load file or assembly 'System.Data.SQLite' or one of its dependencies ...
随机推荐
- var和let的区别
//var 和let的区别 通过var定义的变量,作用域是整个封闭的函数,是全域的, 通过let定义的变量,作用域是在块级或者是子块中 for (let i = 0; i < 10; i++) ...
- 用jQuery设置多个css样式
$("#show_one").css({"position":"fixed","top":"0px" ...
- (WC2016模拟十一)【BZOJ4695】最假女选手
ps:好久没更博啦……这几天连着有模拟赛,等初赛前后休息的时候来疯狂补坑吧……顺便补一下前面的数论啥的? 题解: mdzz我场上写了个15分暴力长度跟标算差不多... 线段树大法好啊!这题听说很多人做 ...
- linux SVN服务器创建版本库
1.安装svn服务 # yuminstall subversion 2.新建一个目录用于存储SVN所有文件 # mkdir /home/svn 3.在上面创建的文件夹中为项目 project_1 ...
- WPF 内存释放
原文:WPF 内存释放 在WPF 项目中引用到Transitionals 实现图片转场特效,发现每次图片转场内存都会增加,在每次转场后进行内存压缩 记录 解决方案如下: GC.Collect(); G ...
- Edward Frenkel关于几何化朗兰兹纲领的采访
本文来自:菲尔兹奖座谈会 博客 Edward Frenkel教授的主要研究方向是数学与量子物理中的对称.他现在在做的许多问题都与朗兰兹纲领有关.他现在是加州大学伯克利分校的数学教授. 在今年的菲尔兹奖 ...
- 题解 P3128 【[USACO15DEC]最大流Max Flow】
此类型题目有两种比较常见的做法:树链剖分和树上差分. 本题有多组修改一组询问,因此树上差分会比树链剖分优秀很多. 这里两种方法都进行介绍. 树链剖分和树上差分的本质都是将一颗树转换为一个区间,然后进行 ...
- 【Henu ACM Round#24 B】Gargari and Bishops
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 如果写过n皇后问题. 肯定都知道 某个点(i,j)和它在同一条对角线上的点分别是i+j的值和i-j的值相同的点. 然后会发现选择的两 ...
- PHP使用数组实现队列(实际就是先进先出怎样实现)
PHP的数组处理函数还能够将数组实现队列,堆栈是"先进后出". 在堆栈中,最后压入的数据(进栈),将会被最先弹出(出栈).而队列是先进先出.就如同银行的排号机 PHP中将数组当做一 ...
- LeakCanary:简单粗暴的内存泄漏检測工具
差点儿每一个程序猿在开发的过程中都会遇到内存泄漏.那么我们怎样检測到app是否哪里出现内存泄漏呢?square公司推出了一款简单粗暴的检測内存泄漏的工具-- LeakCanary 什么是内存泄漏? 内 ...