码迷,mamicode.com
首页 > Web开发 > 详细

SIPp web frontend(2)

时间:2017-06-20 22:24:33      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:存在   eva   ges   地方   poll   over   syntax   pwd   ram   

SIP VoIP 測试交流群: 323827101


欢迎大家转载。为保留作者成果,转载请注明出处。http://blog.csdn.net/netluoriver,有些文件在资源中也能够下载。假设你没有积分,能够联系我索要!

3.6Adding calls to a test(測试脚本添加呼叫)

To add a call, use the add a call link of the corresponding party (see in the figure above) and get to the Create new call screen.

加入一个呼叫,对应的一端使用add a call 链接 (见上图)和開始创建新呼叫

技术分享

Here the command line parameters to pass to SIPp can be set up (the corresponding parameters are stated in round brackets, e.g., -timeout) or (-m), but first

这里的命令行參数能够设置SIPp(用圆括号规定对应的參数比如:(-timeout)或(-m)),首先

·choose an Executable (the version of SIPp you want to use, defined in config.ini.php. See section Config file for more details).

选择一运行文件(在config.ini.php中定义你想用的SIPp版本号。查看Config file一节获得很多其它具体信息)

·choose a Scenario defined earlier in the Manage scenarios tab (Section Manage scenarios).

管理场景选项卡选择一个前面定义的场景

·if a client scenario is used, enter a Remote host. This is where SIPp addresses its messages to.

假设已经用了client场景。输入一个远程主机地址。这地址就是SIPp发送给对端的消息地址。

·check the Monitor call checkbox, if during the test execution realtime feedback of the test progress should be displayed. In that case the tester can also influence the test by pausing it, or by adjusting the packet rate (See section Run a test for more details).

检查监视呼叫复选框,假设在測试脚本时,会实时显示測试过程。在那种情况下測试者通过暂停或调整包的速率也会影响測试效果(查看执行一个測试一节获得更加具体信息)

·check the Log checkbox, if log files (-trace_err, -trace_logs, -trace_rtt, -trace_stat) should be stored in the database.

检查日志复选框。日志文件(-trace_err, -trace_logs, -trace_rtt, -trace_stat)否存到数据库中。

If the given configuration options are not enough, the Extended parameters text field can be used to pass any command line parameters to SIPp. The Extended parameters are not evaluated or modified in any way. It is up to the administrator to use a correct syntax. There may be some command line options that do not work, or even cause SIPp to hang (i.e. -bg).

假设所给的配置选项不够用,Extended parameters 文本框能够给SIPp传递不论什么命令行參数

 Extended parameters由管理员使用正确的语法。并不以不论什么方式评估或改动。或许会有一些命令选项不可用或引起SIPp挂起(比如-bg选项)

If a parameter is specified in the form and also as extended parameter, the extended parameter has the higher priority, and overwrites the other.

假设在表格中指定了一个參数,而且也作为扩展參数,那么扩展參数会有更高的优先权,写还有一

Global parameters (applied to any call) can be defined in the AVP Section of the config.ini.php. These have the lowest priority.

 config.ini.phpAVP Section能定义全局參数(应用于不论什么呼叫)。

这些有最低优先权。

3.7Modify a test / create a new test version(改动/创建一个新測试脚本)

Tests and calls can be modified at any time. If a test has already runs, a crucial modification of the test would mean that test information belonging to these runs is lost, and thus the run is not reproducible anymore. To avoid this, a new version is created automatically.

測试脚本和呼叫可能在不论什么时候都能够被改动。假设个測试脚本已经执行了,改动測试脚本着属于这些执行的測试信息丢失,从而执行不再重现了。为了避免这样的情况,会自己主动创建一个新的版本号。

Simply switch between the versions of a test by clicking the version numbers. A version can even be deleted by using the remove this version link, but then all its runs are lost too.

通过点击版本号号能够实现两个版本号的简单切换。

以致能够用 remove this version链接来删除一个版本号,但这样关这个版本号的測试消息也会删除。

技术分享

3.8Duplicate a test(复制一个測试脚本)

If a test is duplicated using the duplicate test link, the currently displayed version of the test is copied into version 1 of the duplicate. The new name of the duplicate is composed with the original name followed by the word copy. A duplicate initially has no runs.

假设duplicate test链接复制了一个測试脚本。当前显示的測试版本号被复制到副本的版本号1中原来的名称加上单词copy显示副本的名称。副本初始化不会执行

3.9System information(系统信息)

In the System information tab, the page is split in 3 areas. First a list of currently running SIPp instances is displayed. Then the available free disk space is stated. Finally there is a list with the versions of SIPp that are defined in the config.ini.php file, along with their verbose screens.

System information标签分成了3个区域。currently running SIPp instances显示在第一个。然后规定可用的磁盘空间。最后的个列表显示了在 config.ini.php文件中定义的SIPp版本号号,连同他们的具体的屏幕。

技术分享

3.10Kill a hanging SIPp instance(杀死一个挂起的SIPp实例)

An admin can try to kill an instance of SIPp by pressing the corresponding red X button in the list of currently running SIPp instances. Although SIPp runs that are not started through the web frontend are also in the list, they cannot be killed.

当前执行的SIPp列表通过点击红色 X      button来杀一个SIPp实例是从web页面执行的SIPp实例,在web页面不能杀死。

3.11Config file(配置文件)

A line in the config file with a leading ; is a comment and has no effect to the configuration.

配置文件的开头部分是一个描写叙述会影响到配置

The configuration file is divided in three sections respectively tagged with
[EXECUTABLES], [AVP], and [CONFIG].

配置文件被分成三部分,分别用[EXECUTABLES], [AVP][CONFIG]标记

 

·In the [EXECUTABLES]-section SIPp executables and their versions can be specified. At least one executable is mandatory.

[EXECUTABLES]部分是SIPp运行文件。能够指定运行实例。当中至少有一个SIPp可运行文件。

·In the [AVP]-section global command line parameters for SIPp can be specified in form of attribute-value pairs (attribute = value). 

[AVP]部分以属性-值对的形式(属性=值)指定SIPP全局命令行參数。

I.e. most parameters of SIPp (without the leading -) will be accepted (see sipp -h for more details).

比如,接受SIPp(參数中没有-)大多数參数(用命令“sip -h”获得很多其它信息)

These parameters can be overwritten in each individual call by using the Extended parameters textarea in the web tool. Take care that you only use parameters that work with every version of SIPp you are using with this tool. If a attribute has no value, but is a switch, use TRUE as a value (e.g., aa = TRUE). If a value contains non-alphanumeric characters it needs to be enclosed in double-quotes (").

web通过用Extended parameters 文本每一个独立的呼叫中重写这些參数。注意仅能在正在用的SIPp的版本号用这个參数(也就是说版本号中有命令才干用,毕竟每一个SIPp的版本号功能不一样。新的版本号功能比較多一些嘛),除非是一个开,用TRUE作为一个值(比如,aa = TRUE)假设值包括非字母数字的字符须要用双引號(")起来

Parameters not allowed are: 參数不同意是:
i, m, nd, nr, t, p, r, timeout, pause_msg_ign, v, bind_local, inf, sd, sf, sn, stf, trace_msg, trace_shortmsg, trace_screen, trace_err, linebreak trace_timeout, trace_stat, trace_rtt, trace_logs

·In the [CONFIG]-section you will find program specific parameters, like admin password or MySQL-database connection information...

[CONFIG]部分你会程序指定參数,如管理password或MYSQL-database连接信息……

Refer to the config file config.ini.php to get more detailed information about the specific parameters.

关于指定參数请參数配置文件里的config.ini.php获得很多其它具体信息。

4User guide(用户向导)

4.1Manage tests(管理測试脚本)

There is a list of available tests in the Manage tests. If there are many tests, it may be useful to sort the tests by clicking one of the column headings.

Manage tests中是測试脚本列表假设有非常多測试脚本,通过点击头能够自己主动分类。

4.2Run a test(执行一个測试脚本)

Click on a test to get a more detailed view. There choose a version and click on the run this version link to open the test popup.

一个測试项中点击,会得到一个具体的界面。

选择个版本号点击run this version链接弹出測试页面。

技术分享

Click on Run test now to begin testing. Both parties start to process their queues. On the left hand side of each call there is a small image showing the actual state of the call.

Run test now单击開始进行測试。

两方開始处理队列。在个呼叫的左手一个小图像显示呼叫的实际状态。

技术分享

4.3Key commands(keyword命令)

If monitoring is turned on, the test progress can be influenced by using key commands (this is the same as in the command line). First set the focus to the corresponding monitoring screen by clicking on it. When the border of the screen turns red, use the key commands on your keyboard.

假设打开了监控,keyword命令影响測试进展(用命令行測试也一样会影响)。首先通过点击keyword命令设置焦点到对应的监视屏幕屏幕的边界变为红色,使用你的键盘键入命令

·0-9 to switch between screens

0-9 切换屏幕

·+ , - , * , / to adjust packet rate

+ , - , * , / 调整包速率

·q to soft exit

q软退出

·p to pause/resume execution

p暂停/恢复运行

4.4Abort a call / test(停止一个呼叫/測试

Never close the test window without the test finished, because there may reside SIPp processes running on the server. If for some reason a call does not terminate by itself, there are three possibilities to finish the test anyway:

仅仅有測试完毕后才会关闭測试窗体,因在服务中可能驻留SIPp进程。假设因为原因一个呼叫没有自己挂断,完毕这个測试有三种可能:

·If the call has monitoring turned on, try to end the call with the key command q (soft exit).

假设打开了监控功能,试试用软命令q键退出(退出)

·A call that hangs can be terminated by pressing the red X on its right hand side.

通过点击右側红色 button结束挂起的呼叫

·The whole test can be stopped with the Abort test link at the top of the window.

点击接窗体顶部的Abort test链接来停止结束測试

4.5Runs(执行

After a test has finished, the test window is closed automatically and the created run is displayed. The exit and the std error column may contain important information (roll the mouse over the columns for more details in a tooltip box). Click the grey eye buttons to download the log files created during the test.

測试完毕后。測试窗体自己主动关闭创建执行过程中的显示參数。

列exit和std error或许包括重要的信息(悬浮框中滚动鼠标轴获得具体信息)。点击灰色眼睛button来下载在过程中创建的日志文件。

技术分享

It is possible to return to this page, or to another run, any time. Just navigate to the corresponding test in the Manage tests tab, choose the right version and click on a run at the bottom of the page.

可能会返回这个页面。或返回至还有一个执行页面。Manage tests选项卡中导航到对应的測试中就可以,选择一正确的版本号并在页面底部点击就可以执行。

5Programming guide(程序设计说明)

5.1Database (ER Diagram)(数据库(ER图表))

技术分享

5.2Files(文件

·add_call.php is responsible for the add/modify call screen. Adds/modifies calls in the database.

·add_call.php屏幕中代表add/modify call 。在数据库中代表Adds/modifies 呼叫

·authentication.php: checks if admin is logged in. It is included everywhere, where admin should have special permissions.

authentication.php:选择是否admin登录。它包括了admin訪问权限的不论什么地方。

·Call_Data.php: class Call_Data: contains call specific data (process-id, log filenames...) of a currently running call. It has methods to store log files in the database, delete the log files and determine the exit code after execution. When a call is about to be executed, an object of this class is generated and stored in a session variable.

Call_Data.php:Call_Data包括一个当前执行呼叫中调用指定的数据(process-id, log filenames...)

把日志文件存储到数据库删除日志文件和决定运行完后退出的代码。

运行一个呼叫时,生成这个类的一个对象并保存一个会话变量

·config.ini.php: configuration file

config.ini.php:配置文件

·create_run.php: is called from run_progress.php via ajax. It creates a run in the database with the current timestamp.

create_run.php:通过ajaxrun_progress.php调用。数据库中创建一个执行的当前时间戳。

·dbHelper.php: is where the SQL happens. For each table in the database, there is a corresponding class that handles database communication.

dbHelper.php: SQL处理的地方,对数据库中的每一个表来说,有一个对应的类处理数据库通信

·db.php: generates the MySQL database connection object.

db.php:生成MySQL数据连接对象

·exec_call.php: is called from run_progress.php via ajax. The basic function of this file is to build up the command line, create the XML-scenario file and the CSV-injection file in the system‘s temporary folder, execute the call and return its process id (pid).

exec_call.php:通过ajax从run_progress.php调用。这个文件基本功能是构造命令行,系统的暂时目录中创建XML场景文件和CSV注入文件运行呼叫并返回它的进程id(pid).

·garbagecollector.php: removes all SIPp directories in the system‘s temp folder that have not been modified for a specific time (defined in config.ini.php). Further all SIPp processes older than a specific time get killed.

garbagecollector.php: (暂不会翻译)

·get_screen.php: During execution of a call this file is requested periodically via ajax. Here the actual monitor-screen is extracted from the screen file, and returned to status_screen.php (if monitoring is turned on). Further this file checks if the SIPp process is still running, and if not, it returns exit-code and standard-error tostatus_screen.php.

get_screen.php:在执行呼叫期间。通过ajax个文件会周期的向server进行请求

实际上是从screen文件里导出监控屏幕将结束输入至 status_screen.php(假设打开了监控功能)。进一步讲。这个文件检查SIPp进程是否仍在执行假设没有,tostatus_screen.php返回的退出代码和标准错误

·helper.php: just some useful functions.

helper.php:是一实用的功能说明

·index.php: redirect to tests.php.

index.php:定向到test.php

·info.php: represents the System information tab.

info.php:代表System information标签

·kill_process.php: is called from run_progress.php via ajax, if the user wants to kill a SIPp process.

kill_process.php: 假设用户想杀死SIPp进程。会通过ajax从run_progress.php调用此文件

·read_config.php: reads the config file in the three arrays $executables, $avp, and $config. Default values are set if necessary, and there is a function getConfig-Parameters that assembles command line parameters from the AVP section.

read_config.php:$executables, $avp, $config读取配置文件。假设有必要能够设置默认值。有一个得到配置參数(getConfig-Parameters)功能AVP部分中收命令行參数。

·run_detail.php: represents the show run page.

run_detail.php:代表show run页面

·run_progress.php: represents the run test popup. This is where all the ajax happens. Refer to the file itself for detailed information.

run_progress.php:代表run test 弹出窗

这是全部ajax执行的地方,參考此文件获得至多信息

·scenario_detail.php: represents the create/modify scenario screen. Inserts or updates scenario data in the database.

scenario_detail.php:代表create/modify scenario屏幕,在数据库中插入或场景数据。

·scenarios.php: represents the Manage scenarios tab.

scenarios.php:代表Manage scenarios 标签

·send_key.php: is called via ajax from status_screen.php when the user presses a key on the keyboard.

send_key.php:当用户在键盘中按下一个键时, status_screen.php 通过ajax调用send_key.php

·status_screen.php: is displayed in a iframe in run_progress.php during test. Here the status monitor screen of a running SIPp instance is displayed by polling it from the server frequently. Further, keyboard action is sent to send_key.php, that forwards it to the running SIPp instance.

status_screen.php:測试过程中一个内框架中显示 run_progress.php 

从server频繁地轮循显示执行SIPp实例的监控屏幕状态

一步讲,键盘的动作发send_key.php,驱动它来执行SIPp实例

·stop_sipp.php: has a function that tries to stop a running SIPp instance. It takes care that the pid belongs to a SIPp process.

stop_sipp.php:尝试停止一个执行的SIPp实例它负责pid属于一个SIP进程

·sys_get_temp_dir.php: provides functions that determine the working directory and the systems temp directory.

sys_get_temp_dir.php:提供限定工作文件夹和系统时时文件夹

·test_detail.php: represents the create/modify test screen.

test_detail.php:代表create/modify test 屏幕

·tests.php: represents the Manage tests tab.

tests.php:代表Manage tests 标签页。

·view_csv.php: is for downloading CSV files (log files etc.) that are stored in the database.

view_csv.php:下载保存在数据库中CSV文件(日志文件

·view_messages.php: is for downloading the file created by the command line option -trace_messages. The trace_messages file is not stored in the database because it may be very large, but it is left for a short time in the systems temp folder until the garbage collector removes it.

view_messages.php:下载通过命令行 -trace_messages选项创建的文件trace_messages文件不会存到数据库中。为它或许大,可是系统暂时目录中一直保留,除非到达垃圾设置值才会删除。

·view_text.php: is for downloading text files (log files etc.) that are stored in the database.

view_text.php:下载存在数据库中的txt文件日志文件等)

·view_xml.php: is for downloading XML files (scenario files) that are stored in the database.

view_xml.php: 下载存在数据库中的XML文件场景文件)

·/js/ajaxConnection.js: crossbrowser function to create an ajax request object in javascript.

/js/ajaxConnection.js:javascript跨浏览器函数来创建一个ajax的请求对象

·/js/helper.js: some useful javascript functions.

/js/helper.js:些实用的javascript函数。

·/js/run.js: opens a window for a test run.

/js/run.js:測试执行打开一个窗体

·/js/tooltip.js: provides functions to display tooltip texts.

/js/tooltip.js:提供函数来显示工具提示文

·/navigation/pagehead.php: If you want to add a new tab to the navigation, do it here.

/navigation/pagehead.php:假设你想导航栏中加入一个新的标签在这里进行操作。

·/navigation/register.php: Here the navigation of the webfrontend is created.

/navigation/register.php:创建webfrontend导航栏

5.3Command flow during test process(測试过程中的命令流)

技术分享

by Mario SMERITSCHNIG [code/documentation]

 Mario SMERITSCHNIG【代码/文档

 

 

 

 

网上找了一个安装文档地址是:

http://opensource.telkomspeedy.com/wiki/index.php/VoIP_Cookbook:_Installation_of_SIPp_Webfrontend

 

 

拷贝 &提取

mkdir /var/www/sipp

cp sipp_webfrontend_v1.2.tgz /var/www/sipp/

cd /var/www/sipp/

tar zxvf sipp_webfrontend_v1.2.tgz

mv /var/www/sipp/src/* /var/www/sipp/

创建数据

mysql -u root -p

password:

CREATE DATABASE SIPpDB;

USE SIPpDB;

\. /var/www/sipp/tables.sql

quit

编辑config.ini.php

vi /var/www/sipp/config.ini.php

[EXECUTABLES]

3.0 = "/usr/bin/sipp"

 

[CONFIG]

db_host = "localhost"

db_user = "root"

db_pwd = "123456"

db_name = "SIPpDB"

admin_pwd = ""

 

了更加easy訪问网页。清空admin_pwd字段

能够通过

http://localhost/sipp

訪问SIPp Webfrontend ,用

username admin

password <no password>

 

SIPp web frontend(2)

标签:存在   eva   ges   地方   poll   over   syntax   pwd   ram   

原文地址:http://www.cnblogs.com/tlnshuju/p/7056395.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!