<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 297,  comments - 1618,  trackbacks - 0
     

    1.   SIPp概述

    1.1 介紹

     SIPp是一個測試SIP協議性能的工具軟件。這是一個GPL的開放源碼軟件。 
         它包含了一些基本的SipStone用戶代理工作流程(UACUAS),并可使用INVITEB YE建立和釋放多個呼叫。它也可以讀XML的場景文件,即描述任何性能測試的配置文件。它能動態顯示測試運行的統計數據(呼叫速率、信號來回的延遲,以及 消息統計)。周期性地把CSV統計數據轉儲,在多個套接字上的TCPUDP,利用重新傳輸管理的多路復用。在場景定義文件中可以使用正規表達式,動態調 整呼叫速率。
        SIPp可以用來測試許多真實的SIP設備,如SIP代理,B2BUAs,SIP媒體服務器,SIP/x網關,SIP PBX,等等,它也可以模仿上千個SIP代理呼叫你的SIP系統。

        關于SIPpgoogle上搜索到很多,可是關于SIPp的中文說明資料較少,或者很多都是不齊全的安裝使用說明。

    SIPp的網址:http://sipp.sourceforge.net/

    1.2 用途

    SIPp一般來進行AS的壓力測試,圖示如下:

    UAC(發起端,主叫)--------------------AS---------------------UAS(接收端,被叫)

    其中UACUAS都有SIPp來擔任。因此可以由它來控制每秒有多少個caps,也可由它來控制一個呼叫持續多長時間等。

    2. 安裝

    2.1 Windows版安裝

    很簡單,省略。

    3. SIPp的使用

    3.1 運行SIPp

           選擇“程序”->”Sipp_3.1”->Start sipp”,運行界面如下所示:
      

           在命令行運行:sipp,出現幫助信息,如下所示:

                     the scenarios.

                          First line of this file say whether the data is to be

                          read in sequence (SEQUENTIAL), random (RANDOM), or user

                          (USER) order.

                          Each line corresponds to one call and has one or more

                          ';' delimited data fields. Those fields can be referred

                          as [field0], [field1],  in the xml scenario file.

                          Several CSV files can be used simultaneously (syntax:

                          -inf f1.csv -inf f2.csv )

       -infindex        : file field

                          Create an index of file using field. For example -inf

                          users.csv -infindex users.csv 0 creates an index on the

                          first key.

       -ip_field        : Set which field from the injection file contains the IP

                          address from which the client will send its messages.

                          If this option is omitted and the '-t ui' option is

                          present, then field 0 is assumed.

                          Use this option together with '-t ui'

       -l               : Set the maximum number of simultaneous calls. Once this

                          limit is reached, traffic is decreased until the number

                          of open calls goes down. Default:

                            (3 * call_duration (s) * rate).

       -lost            : Set the number of packets to lose by default (scenario

                          specifications override this value).

       -m               : Stop the test and exit when 'calls' calls are processed

       -mi              : Set the local media IP address (default: local primary

                          host IP address)

       -master          : 3pcc extended mode: indicates the master number

       -max_recv_loops : Set the maximum number of messages received read per

                          cycle. Increase this value for high traffic level. The

                          default value is 1000.

       -max_sched_loops : Set the maximum number of calsl run per event loop.

                          Increase this value for high traffic level. The default

                          value is 1000.

       -max_reconnect   : Set the the maximum number of reconnection.

     

       -max_retrans     : Maximum number of UDP retransmissions before call ends on

                          timeout. Default is 5 for INVITE transactions and 7 for

                          others.

       -max_invite_retrans: Maximum number of UDP retransmissions for invite

                          transactions before call ends on timeout.

       -max_non_invite_retrans: Maximum number of UDP retransmissions for non-invite

                          transactions before call ends on timeout.

       -max_log_size    : What is the limit for error and message log file sizes.

     

       -max_socket      : Set the max number of sockets to open simultaneously.

                          This option is significant if you use one socket per

                          call. Once this limit is reached, traffic is distributed

                          over the sockets already opened. Default value is 50000

      -mb              : Set the RTP echo buffer size (default: 2048).

       -mp              : Set the local RTP echo port number. Default is 6000.

       -nd              : No Default. Disable all default behavior of SIPp which

                          are the following:

                          - On UDP retransmission timeout, abort the call by

                            sending a BYE or a CANCEL

                          - On receive timeout with no ontimeout attribute, abort

                            the call by sending a BYE or a CANCEL

                          - On unexpected BYE send a 200 OK and close the call

                          - On unexpected CANCEL send a 200 OK and close the call

                          - On unexpected PING send a 200 OK and continue the call

                          - On any other unexpected message, abort the call by

                            sending a BYE or a CANCEL

       -nr              : Disable retransmission in UDP mode.

       -nostdin         : Disable stdin.

       -p               : Set the local port number.  Default is a random free port

                          chosen by the system.

       -pause_msg_ign   : Ignore the messages received during a pause defined in

                          the scenario

       -periodic_rtd    : Reset response time partition counters each logging

                          interval.

       -r               : Set the call rate (in calls per seconds). This value can

                          bechanged during test by pressing '+','_','*' or '/'.

                          Default is 10.

                          pressing '+' key to increase call rate by 1 *

                          rate_scale,

                          pressing '-' key to decrease call rate by 1 *

                          rate_scale,

                          pressing '*' key to increase call rate by 10 *

                          rate_scale,

                          pressing '/' key to decrease call rate by 10 *

                          rate_scale.

                          If the -rp option is used, the call rate is calculated

                          with the period in ms given by the user.

       -rp              : Specify the rate period for the call rate. Default is 1

                          second and default unit is milliseconds. This allows

                          you to have n calls every m milliseconds (by using -r n

                          -rp m).

                          Example: -r 7 -rp 2000 ==> 7 calls every 2 seconds.

                                   -r 10 -rp 5s => 10 calls every 5 seconds.

     

       -rate_scale      : Control the units for the '+', '-', '*', and '/' keys.

     

       -rate_increase   : Specify the rate increase every -fd units (default is

                          seconds). This allows you to increase the load for each

                          independent logging period.

                          Example: -rate_increase 10 -fd 10s

                            ==> increase calls by 10 every 10 seconds.

       -rate_max        : If -rate_increase is set, then quit after the rate

                          reaches this value.

                          Example: -rate_increase 10 -rate_max 100

                            ==> increase calls by 10 until 100 cps is hit.

       -no_rate_quit    : If -rate_increase is set, do not quit after the rate

                          reaches -rate_max.

       -recv_timeout    : Global receive timeout. Default unit is milliseconds. If

                          the expected message is not received, the call times out

                          and is aborted.

       -send_timeout    : Global send timeout. Default unit is milliseconds. If a

                          message is not sent (due to congestion), the call times

                          out and is aborted.

       -reconnect_close : Should calls be closed on reconnect?

       -reconnect_sleep : How long (in milliseconds) to sleep between the close and

                          reconnect?

       -ringbuffer_files: How many error/message files should be kept after

                          rotation?

       -ringbuffer_size : How large should error/message files be before they get

                          rotated?

       -rsa             : Set the remote sending address to host:port for sending

                          the messages.

       -rtp_echo        : Enable RTP echo. RTP/UDP packets received on port defined

                          by -mp are echoed to their sender.

                          RTP/UDP packets coming on this port + 2 are also echoed

                          to their sender (used for sound and video echo).

       -rtt_freq        : freq is mandatory. Dump response times every freq calls

                          in the log file defined by -trace_rtt. Default value is

                          200.

       -s               : Set the username part of the resquest URI. Default is

                          'service'.

       -sd              : Dumps a default scenario (embeded in the sipp executable)

       -sf              : Loads an alternate xml scenario file. To learn more

                          about XML scenario syntax, use the -sd option to dump

                          embedded scenarios. They contain all the necessary help.

       -oocsf           : Load out-of-call scenario.

     

       -oocsn           : Load out-of-call scenario.

       -skip_rlimit     : Do not perform rlimit tuning of file descriptor limits.

                          Default: false.

       -slave           : 3pcc extended mode: indicates the slave number

       -slave_cfg       : 3pcc extended mode: indicates the file where the master

                          and slave addresses are stored

       -sn              : Use a default scenario (embedded in the sipp executable).

                          If this option is omitted, the Standard SipStone UAC

                          scenario is loaded.

                          Available values in this version:

                          - 'uac'      : Standard SipStone UAC (default).

                          - 'uas'      : Simple UAS responder.

                          - 'regexp'   : Standard SipStone UAC - with regexp and

                            variables.

                          - 'branchc' : Branching and conditional branching in

                            scenarios - client.

                          - 'branchs' : Branching and conditional branching in

                            scenarios - server.

                          Default 3pcc scenarios (see -3pcc option):

     

                          - '3pcc-C-A' : Controller A side (must be started after

                            all other 3pcc scenarios)

                          - '3pcc-C-B' : Controller B side.

                          - '3pcc-A'   : A side.

                          - '3pcc-B'   : B side.

       -stat_delimiter : Set the delimiter for the statistics file

       -stf             : Set the file name to use to dump statistics

       -t               : Set the transport mode:

                          - u1: UDP with one socket (default),

                          - un: UDP with one socket per call,

                          - ui: UDP with one socket per IP address The IP

                            addresses must be defined in the injection file.

                          - t1: TCP with one socket,

                          - tn: TCP with one socket per call,

                          - l1: TLS with one socket,

                          - ln: TLS with one socket per call,

                          - c1: u1 + compression (only if compression plugin

                            loaded),

                          - cn: un + compression (only if compression plugin

                            loaded). This plugin is not provided with sipp.

    3.2 使用SIPp進行壓力測試

    3.2.1啟動服務端

           首先查知本機的IP,例如筆者本機的IP192.168.2.45。在SIPp的運行窗口運行:

    sipp -sn uas -i 192.168.2.45     -p 5060

           出現的命令窗口的內容類似如下:
        

    3.2.2啟動和運行客戶端

           再開啟一個SIPp界面。

    啟動客戶端使用:sipp -sn uac….,使用如下:

    sipp -sn uac -m 1 -i 192.168.2.45 -p 6060 -s 01012345678 192.168.2.154

          啟動后命令窗口如下所示:
       

    其中:

           -m:該參數表示每秒的caps數,若沒寫該參數,默認為每秒10caps

           -i:這個用于指定本機的ip,若本機只有一個ip,可以不指定,若有多個IP,需要指定該參數;

           -p:指定本機的端口,可以不指定;

           -s:該參數用于指定要呼叫的電話號碼;

           192.168.1.154ASIP地址,沒有指定端口時,默認指向的端口為5060

           注意:因為UACUAS都在筆者機器,IP:192.168.2.45,因此AS端還需要對應配置,將落地等的IP地址等都指向該IP。對于我們的環境來說,需要配置SCFconfig.as.ACD文件,修改成:
      

           筆者修改了ss1IP為:192.168.2.45.

           在使用uac前,可使用SIP軟終端來測試下是不是呼叫后落地是不是落在本機。

    3.2.3查看運行結果

           在運行:

    sipp -sn uac -i 192.168.2.45 -p 6060 -s 01012345678 192.168.2.154

       后(該句為10caps),可查看UASUAC的界面,服務端的界面類似如下所示:
       

           UAC端的界面類似如下所示:
       

           因為筆者的AS沒有發183的流程,所以它的次數是為0的,后續章節還會說到如果不是SIPp的參考流程時該怎么做。

    3.2.4查看AS所在的Linux機器的性能情況

    1inmon

           公司的SCF提供inmon來查看自動機掛接等的情況,如下所示:
       

           其中FSMS表示當前掛著的自動機數,是需要關注的項。

    2vmstat

    vmstat 命令報告關于內核線程、虛擬內存、磁盤、陷阱和 CPU 活動的統計信息。由 vmstat 命令生成的報告可以用于平衡系統負載活動。系統范圍內的這些統計信息(所有的處理器中)都計算出以百分比表示的平均值,或者計算其總和。

    例如筆者使用:

    vmstat 3

    表示每隔3s顯示內核線程、虛擬內存、磁盤、陷阱和 CPU 活動的統計信息。界面如下所示:
       

           重點要關注的項是iocpu等信息。

    3top

    top命令提供了實時的對系統處理器的狀態監視。它將顯示系統中CPU敏感的任務列表。

    運行top命令后,AS所在Linux機器的顯示效果如下:
       

    因為應用主要為ccmysql,所以要重點關注這兩者是否穩定。

    主要關注的項是VIRTRES,如果這兩者一直增加,那很可能程序或其它地方存在內存泄露。

    3.2.5其它

    UAC端運行的過程中:

    1) 按“+”鍵表示在當前caps的基礎中加1

    2) 按“-”鍵表示在當前caps的基礎中減1

    3) 按“*”鍵表示在當前caps的基礎中+運行起點的caps,例如10caps,按“*”后,變成20,再按“*”變成30.

    posted on 2009-09-11 13:45 阿蜜果 閱讀(15248) 評論(7)  編輯  收藏 所屬分類: 協議


    FeedBack:
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2012-06-25 22:44 | SIP愛好者
    建議使用kylinPET性能測試工具,比SIPp好用多,支持圖形化編輯業務流程,支持多種并發模型,支持發送與輸出媒體流指標。  回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2013-05-13 10:00 | 程序
    sipp
    window版本去那里下載  回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2013-08-26 14:25 | luoriver
    @程序
    sipp官網http://sourceforge.net/projects/sipp/
    歡迎加入SIP 測試人員交流群:323827101,群里可能有你需要關于SIP協議的相關資料  回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2013-08-26 14:36 | luoriver
    -oocsf : Load out-of-call scenario.
    -oocsn : Load out-of-call scenario.

    請問這兩項是什么意思啊,我QQ:402007353,謝謝!  回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2013-10-16 11:23 | baoling
    需要配置SCF的config.as.ACD文件
    在哪兒配置,求步驟  回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2013-11-22 21:28 | Arthas
    kylinPET性能太差了,并發都上不去,而且界面不夠友好@SIP愛好者
      回復  更多評論
      
    # re: 蜜果私塾:使用SIPP來進行SIP壓力測試(一)
    2014-03-07 15:12 | jishu
    請問為什么打命令都提示“不是內部或外部命令”  回復  更多評論
      
    <2009年9月>
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

          生活將我們磨圓,是為了讓我們滾得更遠——“圓”來如此。
          我的作品:
          玩轉Axure RP  (2015年12月出版)
          

          Power Designer系統分析與建模實戰  (2015年7月出版)
          
         Struts2+Hibernate3+Spring2   (2010年5月出版)
         

    留言簿(263)

    隨筆分類

    隨筆檔案

    文章分類

    相冊

    關注blog

    積分與排名

    • 積分 - 2294312
    • 排名 - 3

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 四虎永久免费地址在线观看| 亚洲youwu永久无码精品 | 亚洲熟妇少妇任你躁在线观看无码| 99久久国产免费中文无字幕| 日韩毛片免费一二三| 亚洲综合校园春色| 国产成A人亚洲精V品无码性色| 国产无遮挡又黄又爽免费视频| 亚洲男人天堂2017| 亚洲一区视频在线播放| 好爽好紧好大的免费视频国产| 日本XXX黄区免费看| 久久99青青精品免费观看| 亚洲人成激情在线播放| 国产免费卡一卡三卡乱码| A在线观看免费网站大全| 18以下岁毛片在免费播放| 国产一级黄片儿免费看| 一级做α爱过程免费视频| 猫咪免费人成在线网站| 亚洲av中文无码字幕色不卡| 亚洲1区1区3区4区产品乱码芒果 | 亚洲av不卡一区二区三区| 久久久久亚洲av毛片大| 亚洲av无码专区在线观看素人| 免费视频中文字幕| 好吊妞在线新免费视频| 免费a级毛片无码a∨蜜芽试看| 91精品免费在线观看| 国产免费一区二区三区| 亚洲一区免费在线观看| 蜜臀98精品国产免费观看| 91制片厂制作传媒免费版樱花| 污污网站18禁在线永久免费观看| 国产在线精品免费aaa片| 中文字幕无码一区二区免费| 国产精品免费观看调教网| 久久午夜羞羞影院免费观看| 午夜影院免费观看| 91免费国产自产地址入| 两个人的视频高清在线观看免费|