#!/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的更多相关文章

  1. error_Could not load file or assembly

    原文链接 Could you be missing the loaded assembly from your configuration file? Ensure you have somethin ...

  2. configuration error-could not load file or assembly crystaldecisions.reportappserver.clientdoc

    IIS启动网站后报错: configuration error Could not load file or assembly 'crystaldecisions.reportappserver.cl ...

  3. 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 ...

  4. Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting'.系统找不到指定文件

    项目部署到服务器后出现如下错误信息: Parser Error Message: Could not load file or assembly 'System.ServiceModel.Domain ...

  5. 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 ...

  6. 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 数据库服 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. linux上测试磁盘IO速度

    运维工作,经常要测试服务器硬件性能,以此来判断是否存在性能瓶颈. 下面介绍在linux上测试磁盘IO速度的工具: 1.hdparm CentOS中,安装的两种方法: 1) yum安装. # yum i ...

  2. JMS消息

    1.消息可分为3部分:消息头.属性和有效负载 消息头:用于标识消息.声明消息属性及提供路由信息的特殊字段组成. 消息的属性区包含了和该消息有关的附加元数据,这个元数据由应用程序开发者进行设置,或者由J ...

  3. SCIP,Clp,Gurobi和Cplex安装

    SCIP安装 1.在自己的家目录下建立目录scip,并将获得的压缩包考入该文件夹并解压缩 tar -zxvf scipoptsuite-5.0.0.tgz 2.进入目录scipoptsuite-5.0 ...

  4. 紫书 例题 10-4 UVa 10791(唯一分解定理)

    首先分解,然后可以发现同一个因子ai不能存在于两个以上的数中 因为求的是最小公倍数,如果有的话就可以约掉 所以数字必然由ai的pi次方的乘积组成,那么显然,在 a最小为2,而b大于2的情况下a*b&g ...

  5. 题解 LNOI2014 LCA

    题目:传送门 这道题根本不用lca,也没有部分分... 考虑求两个点xy的lca的深度. 我们将x到树根所有点的值都加1,然后查询y到根的和,其实就是lca的深度. 所以本题离线一下上树剖乱搞就可以了 ...

  6. DataTable 数据导入MS ACCESS 数据库中 数字类型字段为空的解决办法

    string strSql = "insert into GongCheng (GCSY,GCBH,GCBHOLD,GCMC,GCKCJD,GCJSDW,GCSJDW,GCKCDW,GCSG ...

  7. C语言之文件操作04——输入矩阵a,b,求乘积c,并打印a,b,c到文件

    //文件与数组结合 /* ================================================================= 题目:输入矩阵a,b,求乘积c,并打印a, ...

  8. 阿里云X-Forwarded-For 发现tomcat记录的日志所有来自于SLB转发的IP地址,不能获取到请求的真实IP。

    1.背景:阿里云的SLB的负载均衡,在tomcat中获取不到真实IP,而是阿里的内网IP,SLB中俩台或者3台本身是局域网,这里是SLB原理,能够看看.没怎么看懂.呵呵,要细细读下. 2.须要开启to ...

  9. hibernate动态表名映射--仅仅有想不到,没有做不到

    近期的一个项目有一个需求,有N个考核单位,要对每一个考核单位生成一张考核情况表.这样做的目的是横切数据库,这这个需求的实现中,我的组员遇到了一个技术问题,我将我的解决的方法和整个思考过程与大家分享, ...

  10. PHPStorm打开文件所在目录

    很实用~