未来已来

发布新日志

  • 老婆测试工具培训记 - LoadRunner Winsocket 动态数据处理

    2008-08-27 19:11:53

    /*** Actions.c ***/

    #include "lrs.h"

    #define host "localhost"
    #define port 23
    #define socktype "TCP"

    void Printf( char * str )
    {

     lr_message ( str );

    }

    int recv( char *sock, char *buffer, int bytes, int flags )
    {
     int size;
     int byte;
     int result;
     char *data = (char *)malloc(1);
     char input[12767];  // make as big or small as you want
     
     sprintf(input,"");
     for (byte = 0; byte < bytes; byte++)
     {
      lrs_set_recv_timeout(1,0);
      result = lrs_receive_ex(sock, "WS_BufferIN", "NumberOfBytesToRecv=1", LrsLastArg);
      lrs_get_last_received_buffer(sock, &data, &size);
      if (size != 0)
       sprintf(input,"%s%c",input,data[0]);
     }
     strncpy(buffer,input,strlen(input));
     return strlen(input);
    }

    int send( char *sock, char *buffer, int bytes, int flags )
    {
     int size;
     int byte;
     int result;
     char *data = (char *)malloc(1);
     char input[12767];
     
     sprintf(input,"");
     
     lrs_set_send_buffer(sock,buffer,strlen(buffer));
     //sprintf(WS_BufferOUT,"%s",buffer);
     result = lrs_send(sock,"WS_BufferOUT",LrsLastArg);
     return strlen(buffer);
    }


    Actions()
    {

     char WS_Sock[] = "socket0";
     char *WS_SockType = (char *)malloc(3);
     char *WS_RemoteHost = (char *)malloc(1024);
     char *WS_Data = (char *)malloc(2024);
     int WS_Result;
     int size;
     char *data = (char *)malloc(1024);
     char temp[2024];
     char buffer[1024];


     sprintf(buffer,"RemoteHost=%s:%d",host,port);
     strncpy(WS_SockType,socktype,3);
     strncpy(WS_RemoteHost,buffer,strlen(buffer)); 

     // Create & Connect to host specified in WS_RemoteHost
     // the TCP/IP connection will be of WS_SockType
     lrs_create_socket(WS_Sock, WS_SockType, WS_RemoteHost,  LrsLastArg);

     // read in 10 bytes from the remote host
     recv(WS_Sock,data,10,0);
     sprintf(temp,"%s",data);
     Printf(temp);

     sprintf(temp,"This is outgoing data...");
     // send a string to the remote host
     send(WS_Sock,temp,strlen(temp),0);

     // close the connection
     lrs_close_socket(WS_Sock);


     return 0;

    }

  • SAP Monitor Counters

    2008-08-27 18:50:43

     

    Av. DB Req. Time

     

    A considerable amount of the dispatched time of a dialog is spent reading or changing the data of the respective database. The time for processing logical data base requests is stored in this field.

     

    Various factors affect the logical DB access time. Read requests can either be sent to the data base buffers or to the fast local SAP buffers. The efficiency of the buffers, the required number of requests as well as a large number of database change requests affects the total access time.

     

    The DB access time also takes into account the data base server CPU performance as well as network transfer times.

     

     

    Av. Enqueue Time

     

    No information for this from the SAP server.

     

     

    Av. Response Time

     

    The response time of a dialog step comprises the time for the dialog request to the dispatcher work process, dialog processing, and completion of the dialog in the dispatcher and transfer of data to the presentation medium.

     

    Please note that the time required for processing the "Presentation -- Dispatcher -- Presentation" communication step is not taken into account here. In long-distance or low-performance networks, this step can lead to considerably longer 'subjective' response times.

     

    Response time is usually divided into waiting time and dispatched time.

     

    The SAP response time consists of the following components:

     

    Response time             =     Waiting time + "Dispatched" time

     

    Dispatched time   =     Generation times at run-time

     

    + Loading time for programs, screens, and CUA interfaces

     

    + Roll times for rolling the working data in and out

     

    + ABAP / 4 processing time

     

    + DB database interface time – that required at the SAP interface from ABAP / 4 to the database and SAP buffer

     

    + Enqueue time for SAP logical lock processes

     

    The displayed CPU time is also a component of the response time, but is not broken down further. Thus the CPU time is a further independent component of the response time.

     

     

    Av. RFC + CPIC Time

     

    There is no information for this in the ST03 transaction.

     

     

    Av. Roll I + w time

     

    No documentation available.

     

     

    Average Bytes Req.

     

    A number of interfaces provide the SAP application with data for various purposes. The data requests are differentiated according to the following interfaces/data types:

     

    Screen sources

    Screen load

    ABAP   sources

    ABAP   load

    CUA    sources

    CUA    load

    Nametab interface

    CPIC    interface

    DDIC    interface

    DSQL    interface (user data from data base)

     

     

    Average CPU Time

     

    During execution of a dialog step, the application server CPU is used for processing (loading, generating, processing DB requests, processing ABAP/IV...). The CPU time represents a large part of the dispatched time, which is response time without waiting time.

     

     

    Average Load Time

     

    Loading and generating time comprises the time required to load objects such as source codes, CUA interface and screen information from the database and to generate them, if required.

     

     

    Average Wait Time

     

    Under normal circumstances, a dialog step should be transferred from the dispatcher work process to the application process immediately after its request. If this is executed, the average waiting time in the dispatcher process is several milliseconds. In high-load situations in the application server or the system, waiting times in the dispatcher queue and considerable response times (> 1s) can occur.

     

     

    CPU Time

     

    During execution of a dialog step, the application server CPU is used for processing (loading, generating, processing DB requests, processing ABAP/IV). The CPU time represents a considerable amount of dispatched time, and thus of response time without waiting time.

     

     

    Database Calls

     

    Total of the modification (INSERTs, UPDATEs, DELETEs) and delete commands to the database system.

     

     

    Database Requests

     

    The number of logical data base requests corresponds to the number of requests transferred by the ABAP/IV processor to the interface. Please note the difference between logical requests and calls transferred to the database by the interface.

     

     

    DB Calls: Changes

     

    Number of logical table change requests. Change requests are UPDATE, DELETE or INSERT one or more lines of a table.

     

     

    DB Calls: Direct Reads

     

    Number of logical "direct read" data base requests, e.g. ABAP/IV "SELECT SINGLE ..." statements.

     

    The local SAP buffer can in certain cases, process the request. If not, it must be transferred to the database.

     

     

    DB Calls: Sequential Reads

     

    Number of logical "sequential read" data base requests, e.g. ABAP/IV SELECT * FROM ... statements. This request can, in certain cases, be processed by the local SAP buffer (100% buffer for tables) and if not, is transferred to the database.

     

     

    Dialog Steps

     
    The number of counted/usable dialog steps or statistics records.  A dialog step is logged as a statistics record in the SAP workload statistics if it is one of the following types: DIALOG, UPDATE, BATCH, SPOOL, ENQUEUE.

     

     

    Roll wait time

     

    Response time of dialog steps which are not ended, despite roll out (such as some RFCs, for example), and which wait a certain time in the roll area until the dialog step is continued. This time is called the waiting time in the roll area.

     

     

    Roll-in time

     

    Time used in dialog steps for roll in/out operations.

     

    In roll-in operations, user-specific data is transferred (rolled in) to the process work area from the shared memory roll buffer or roll file.  In roll-out operations, data is transferred (rolled out) to the roll buffer or roll file.

     

     

    Roll-ins

     

    Number of roll-in operations.

     

    In roll-in operations, user-specific data is transferred (rolled in) to the process work area from the shared memory roll buffer or roll file.  In roll-out operations, data is transferred (rolled out) to the roll buffer or roll file.

     

     

    Roll-out time

     

    Time used in dialog steps for roll in/out operations.

     

    In roll-in operations, user-specific data is transferred (rolled in) to the process work area from the shared memory roll buffer or roll file.  In roll-out operations, data is transferred (rolled out) to the roll buffer or roll file.

     

     

    Roll-outs

     

    Number of roll-out operations.

     

    In roll-in operations, user-specific data is transferred (rolled in) to process work area from the shared memory roll buffer or roll file. In roll-out operations, data is transferred (rolled out) to the roll buffer or roll file.

     

     

    Time per DB Request

     

    Average response time of all commands to the database system in milliseconds.

     

    As access times to buffered tables are shorter, they are not included in the runtime measurement.

     

     

    Time per Req.:    Changes and commits

     

    Mean time per dialog step for logical  "UPDATE", "DELETE" or "INSERT" database requests.

     

    The time requirements for 'Commit work' requests to the database are also taken into account here.

     

     

    Time per Req.:    Direct Reads

     

    Mean time per dialog step for a logical "direct read" data base request, e.g. the ABAP/IV "SELECT SINGLE ..." statement.

     

     

    Time per Req.:    Sequential Reads

     

    Mean time per dialog step for a logical "sequential read" data base request, e.g. the ABAP/IV "SELECT * FROM ..." statement.

     

  • Mercury SiteScope 性能监控工具简介

    2008-08-17 22:58:13

        SiteScope是由Mercury Interactive公司所提供的系统管理软件。SiteScope可以实施于Windows PC 服务器,Sun Solaris平台或是Linux之上,在统一的平台上集中式地管理各种不同的操作系统的服务器,WEB服务器,数据库系统,邮件服务器,网络设备,应用服务器等等资源。它的显著的无代理方式监控技术的应用,尤其适用于多变的系统环境之中,再加上SiteScope的远端管理方式和极其灵活的配置方式,将为用户的管理和服务助一臂之力。
        在传统的网络系统管理软件中,大部分都采用Manager-Agent的体系结构。Agent是指安装在被管理的生产系统机上的一个或是多个代理程序,它负责采集被管理机上的一系列性能数据,并把数据传递给Manager一端。尽管许多厂商宣称这些代理程序Agent将以较低的优先级和较少的资源消耗运作,我们还是无法避免这样一个问题。就是当我们的关键的生产应用系统发生性能危机时,我们无法排除代理软件Agent对生产系统的或多或少的影响。换言之,管理软件的代理程序的存在,干扰了我们对生产系统的维护和性能问题的诊断。尤其是在有众多服务器的环境中,为了保障用户的托管服务器的绝对的安全和无干扰,我们在此推荐SiteScope所采用的先进的Agentless系统管理和性能管理技术,它将避免在生产系统中安装任何不必要的代理程序。没有代理程序,被管理机的资源消耗和影响也减到最小。由于在SiteScope管理系统中采用了与操作系统厂商、数据库厂商和其他应用系统厂商的性能数据库的集成,我们将在不修改生产系统机的情况下,对其进行全面的系统、数据库和应用系统性能管理。无代理程序的系统、数据库和应用系统性能管理方案,它将生产系统的日常运行和管理系统的操作分离了开来,使得管理系统对生产系统的消耗和影响降到了最低点。SiteScope目前支持绝大多数的业界流行的标准,包括操作系统类型Windows/Unix/Linux,数据库,邮件系统,FTP服务器,网络设备,应用服务器,中间件,等等90多种不同监控器。


    SiteScope提供了对于不同URL和业务关键交易的监控点,它甚至也可以模仿业务用户来填写Web表单。它基本的URL监控点要远比其它产品要丰富得多。
       用户可以通过URL监控器管理每一个关注的WEB页面的响应时间,使用URL content做页面内容的匹配检查。而URL sequence监控器更能模拟用户一定的业务流程顺序的访问一组页面。SiteScope 从URL等监控器获得数据帮助用户实时的了解的基于WEB的应用系统的性能问题。
    传统的性能监测方式依赖片断式的结构显示。每个IT 部门都配有不同人员负责网络结构的某一部件。而且,每个部门又都使用各自的监测器跟踪系统性能。其结果是从元件层面得到的是片段孤立的应用性能显示。利用Mercury Interactive 的SiteScope,管理员从一台座机就能监测到所有服务器和应用程序的性能品质,发生状况立即能接收到警报。SiteScope可以在系统发生故障时,发送Email,SMS,Pager,SNMP traps,scrīpts,Sound,Database,Log,Post等不同形式的警告到管理员的信箱或是手机。在任何时候,管理员都会在第一时间,早于客户了解到系统的运作状况。在一个警报之后,SiteScope能够实施一系列自动的应急措施,在管理员到达现场之前,尽量避免down机等重大损失


     

  • LoadRunner监控器系列-How to set up the WebLogic monitor

    2008-08-17 22:33:56

    Installation Overview

    LoadRunner provides two different ways to monitor a WebLogic server depending upon the WebLogic version, i.e. SNMP-based monitor, or JMX monitor.

    WebLogic Monitor (SNMP-based monitor)

    WebLogic monitor (SNMP- based) gathers measurement based on information returned by the WebLogic SNMP agent. 

    ·        Availability: LoadRunner 6.0

    ·        Supported Server Version: WebLogic 5.x

    ·        Supported Server Platform: Windows NT, Windows 2000

     

    WebLogic Monitor (JMX monitor)

    WebLogic monitor (JMX) gathers measurement based on Java API. It uses the JMX interface, (which is a Sun extension to Java.

    ·        Availability: LoadRunner7.02 or above

    ·        Supported Server Version: WebLogic 6.x –7.x. For WebLogic8.x, please refer to the additional setup information below .

    ·        Supported Server Platform: Windows NT, Windows 2000, Solaris 2.6, AIX 5.1, HP-UX 11

    WebLogic Monitor (SNMP-based monitor)

    Installation guide

    The WebLogic (SNMP) monitor uses SNMP to retrieve server statistics. To use this monitor, you must make sure that a version prior to WebLogic 6.0 is installed on your server, and that the SNMP agent is installed and activated on the server.

    How to start the Bea Web Server

    1.      Go to the WebLogic directory.

    2.      Save the startWebLogic.cmd file as startWebLogic.bat.

    3.      Open startWebLogic.bat and set the JDK_HOME parameter to <JDK installation>.

    4.        Run startWebLogic.bat from the Command Prompt and wait a couple of minutes – if it starts OK, you will receive a “WebLogic started” notification.

    How to start the SNMP agent on the server

    1.      Make sure that the standard SNMP agent is not running – to verify this, go to Control Panel ® Services and check the status of SNMP and SNMP Trap or consult the UNIX admin for the SNMP daemon on the Unix machine.

    2.      For the Windows platform, Open startSnmpAgent.cmd or startSnmpAgent.bat and set the JDK_HOME parameter to <JDK_installation_directory>.

     For the UNIX platform, the batch file is startSnmpAgent.sh.

    3.     In the same file (startSnmpAgent.bat or startSnmpAgent.sh), search for the following line (usually the last line in file):

    “%JDK_HOME%\bin\java -classpath %JAVACLASSPATH% weblogic.SNMPAgent -password ServerSystemPassword -serverURLs t3://localhost:7001 -trapDestinations localhost:162”

    ·        This is the command use to startup the WebLogic SNMP agent.

    ·        It requires a Java Virtual Machine for execution.

    ·        The classpath must contain weblogicaaux.jar and \weblogic\classes. For Weblogic 5.1 with SP, you would need to add the sp jar file (usually named weblogic510spxxx.jar)to the CLASSPATH of the agent startup scrīpt.

    4.      Replace ServerSystemPassword with the password defined during server installation.

    5.      If you do not know your password, it is in the “weblogic.properties” file under the property “weblogic.password.system=???.”

    6.      You will probably need to change “localhost” to the name of your machine.

    7.      Run startSnmpAgent.bat from the Command Prompt.  If it starts OK, you will receive a “Agent Initialization Complete” message.

     

    NOTE:

    1.      For detailed instructions on installing the WebLogic SNMP agent and the utilities to test the agent, see http://www.weblogic.com/docs51/admindocs/snmpagent.html.

    2.      If you intend to run the WebLogic Server SNMP agent as the only agent on the system, you may not be able to start it if any other agent is already running and is bound to the SNMP port (161).

    How to configure the SNMP-based monitor in LoadRunner

     

    1.      Click the WebLogic (SNMP) graph in the graph tree, and drag it into the right pane of the Run view.

    2.      Right-click the graph and choose Add Measurement(s), or choose Monitors à Add Online Measurement.

    3.      In the Monitored Server Machines section of the WebLogic (SNMP) ( or WebLogic) dialog box, click Add to enter the server name or IP address of the machine you want to monitor. Select the platform on which the machine runs, and click OK.

    4.      In the Resource Measurements section of the WebLogic (SNMP) dialog box, click Add to select the measurements that you want to monitor. The WebLogic SNMP Resources dialog box displays the available measurements.

    5.      Browse the WebLogic SNMP Objects tree.

    6.        To measure an object, select it, and click Add. The following tables describe the measurements and server properties that can be monitored

     

     

     

    Known Issues and limitations

     

    1.      The SNMP-based monitor can only monitor up to 25 measurements.

     

    2.      Some network devices between the LoadRunner Controller machine and the SNMP agent machine might be configured to block or reroute the SNMP traffic. 

    Tips and Tricks

    Q.   LoadRunner 6.51 Controller crashes if the SNMP agent is unavailable

    R.     This is a known issue in LoadRunner 65 SP1.  To resolve the issue, please download and apply Patch LR651P34 from Support’s Download à Patches à LoadRunner à 6.5 SP1 à LR651P34 - LoadRunner 6.51 Fixed Controller crashes caused by unavailability of the SNMP or WebLogic server

     

    Q.   How to monitor a non- Community String

    R.     To do so, please modify the snmp.cfg located in <LoadRunnner >\dat\monitors:

    1.      Look for the appropriate monitor.

    2.      Uncomment the "SNMP_community_name=" line by removing the semi-colon (";").

    3.      Add the community string setup by the SNMP agent, to the end of “SNMP_community_name=;”. Please note that this is case-sensitive.

    4.      Save the snmp.cfg file and restart the LoadRunner Controller.

     

    Q.   How to change the port number

    R.     To do so, you need to modify the snmp.cfg file in <LoadRunner>\dat\monitors.

    1.         Look for the appropriate monitor.

    2.         Uncomment the  "port=" line by removing the semi-colon (";").

    3.           Add the port number to the end of “port=”. For example, port=1234

     

    Q.   What to do if there is a firewall between Controller and Host

    For monitoring over firewall, please refer to Knowledge Base Article 3678

     

     

    Q.   Error: “Not a scalar MIB object”

    R.     You receive this error because you are trying to access a private/ proprietary MIB file.  LoadRunner does not recognize this file, as it is not in LoadRunner’s MIB definition file.

     

     WebLogic Monitor (JMX monitor)

    Installation Requirement

    1.      WebLogic 6.0 or above on the server

    2.      JDK 1.3.x or above installed on the Controller machine. For WebLogic8.x, you need JDK1.4.

    3.      Copy WebLogic.jar from <server installation>\lib folder to <LoadRunner>\classes

    4.      LoadRunner 7.02 or above:

    a.       No patches is required for LoadRunner 7.5 or above

    b.      For LoadRunner 7.02:

    ·  Contact Mercury Customer Support for patch LR702P34 - LoadRunner 7.02 WebLogic JMX monitor for versions 6.0 & 6.1

    ·  To install:

    i.         Exit LoadRunner Controller.

    ii.       Unzip weblogic60_702.zip in the LoadRunner installation directory.

    iii.      Terminate the Java Web server by entering the URL 

    http://localhost:1112/?id=exit&type=0 in a browser.

    iv.     Run patch_monitors_v702.bat in <LoadRunner>\bin

    v.       Install Java Runtime by executing j2re-1_3_1-win.exe.

     

    How to configure the WebLogic (JMX) Monitor in LoadRunner

    1.      Click the WebLogic (JMX) graph in the graph tree, and drag it into the right pane of the Run view.

    2.      Right-click the graph and choose Add Measurement(s), or choose Monitors à Add Online Measurement.

    3.      In the Monitored Server Machines section of the WebLogic (JMX) dialog box, click Add to enter the server name or IP address of the machine you want to monitor. Enter the server name or IP address according to the following format:

    <server name>:<port number>  

    For example: mercury:8111. Select the platform on which the machine runs, and click OK.

    4.      Click Add in the Resource Measurements section of the WebLogic (JMX) dialog box. In the Enter Login Information dialog box, enter the username and password of a user with administrative privileges to the WebLogic server. The BEA WebLogic Monitor Configuration dialog box opens. For details on creating user permissions, see

    5.      Browse the Measured Components tree.

    6.      Check the required performance counters in the BEA WebLogic Monitor Configuration window's right pane.

    7.        Click OK in the BEA WebLogic Monitor Configuration dialog box, and in the WebLogic (JMX) dialog box, to activate the WebLogic (JMX) monitor.

     

  • LoadRunner性能测试监控篇-How to set up the SiteScope - Unix Linux monitor

    2008-08-12 20:54:02

    Requirements

     

    ·        Server Resource monitor license

     

    ·        LoadRunner 7.51 or above:

     

    ·        For LoadRunner 7.6 or above, the SiteScope Unix monitor is built into the Controller.

     

    ·        For LoadRunner 7.51 SP1, make sure that you install the Controller add-in, LR_New_SiteScope_Monitor.exe. This is available in the Patches database ® LoadRunner ® 7.51 SP1 ® Performance Monitor ® LR751SP1P2 ® LoadRunner 7.51 SP1 SiteScope Unix monitor for LoadRunner version 7.51.

     

    ·        SiteScope Lite installation:

     

    • For LoadRunner 8.x , the Sitescope Lite installation file is available in the additional components CD under Sitescope -> sitescopelrsetup.exe

     

    • For LoadRunner 7.6 or above, the SiteScope Lite installation file (SiteScopeSetupForLR.exe) and SiteScope Lite license is available in the Patches database ® LoadRunner ® 7.6 ® Performance Monitor ® LR76P6 - LoadRunner 7.6 SiteScope Siebel and SAP Portal Add-in for LoadRunner.

     

    • For LoadRunner 7.51 SP1, the SiteScope Lite installation file and SiteScope Lite license is available in the Patches database ® LoadRunner ® 7.51 SP1 ® Performance Monitor ® LR751SP1P2 ® LoadRunner 7.51SP1 SiteScope Unix monitor for LoadRunner version 7.51.

     

     

     


    SiteScope Installation

     

    Ensure you have LoadRunner 7.51 SP1 or above installed.  Ideally, you will want an extra machine for the SiteScope installation:

     

    • First machine   ® Controller
    • Second machine ® SiteScope
    • Third machine  ® Load Generator
    • Fourth machine ® Load Generator

    Etc.…

     

    In this situation, SiteScope will be gathering information from the Unix Servers and displaying them via a Web interface.  The Controller will then connect to the SiteScope installation and retrieve this data during the scenario run.

     

    General install

     

    1.      Obtain the SiteScope Lite installation file and SiteScope Lite license.

     

    2.      On the machine where you wish to install SiteScope, run the installation file as explained in the Requirements section.

     

    3.      In the “Administrator E-mail Address” window, enter an E-mail if you want a designated person to receive Alerts, reports, and status messages. Otherwise, click <Next> to proceed to the next window.

     

     

     

     

    4.      Follow all the defaults settings to complete the SiteScope Lite installation.

     

    5.      When the installation of SiteScope is completed, a browser will automatically come up with instructions on how to start SiteScope.  The way to bring up SiteScope is via a browser with the URL http://<machine-name>:8888/SiteScope.

     

    As you can guess, SiteScope installs its own Web server as an interface to the application.

     

     

    License install for SiteScope

     

    Note: If you do not have a SiteScope license, please refer to the terms and conditions statement, then obtain the license key from LR76P6 on the Customer Support Download page.

     

    1.      The first time you start SiteScope, you will get a “SiteScope First Time Setup” page. Click on “Skip this Page” to go to main SiteScope site.

     

    2.      Once the Auto Configuration completes, you will be brought to the main SiteScope page. 

     

    3.      Click on the “Preferences” link from the main SiteScope panel.

     

    4.      Enter the license in the “License Number” textbox.

     

    5.      Click the “Save Changes” button.

     

     

     

     

     


    SiteScope Monitor Configuration

     

    How to remove existing groups

     

    On the SiteScope main page, you will see the following groups by default:

     

    • Network
    • Server

     

    You are recommended to delete both of these groups.

     

    1.      Click on the group name (e.g., Network, or Server).

    2.      At the bottom of the page, click on “Delete this Group.”

    3.      On the Confirmation page, click on the “Delete <GroupName>” button to confirm the deletion.

     

     

    How to add a SiteScope Unix monitor group

     

    1.      On the SiteScope main page, click on “Create Groups.”

    2.      Enter a name for the group (e.g., LoadRunner Unix).

    3.      Click on the “Add” button.

     

     

    How to add a monitor to a group

     

    Example:

     

    Steps to add a CPU monitor:

    1.      From the SiteScope main page, click on the group name to go to the group.

    2.      Click on “Add a New Monitor to this Group.”

    3.      Click on “Add CPU Utilization Monitor.”

    4.      Click on “Choose a Server.” (This portion will add your Unix server to the machine list.)

    5.      Click on “Setup Unix Remote.”

    6.      Click on “Add a Remote Machine.”  Enter the following information:

     

    • Server Address
    • OS Type
    • Connection method: Choose “Telnet” as the connection method.

    SiteScope uses a telnet login to access the machine and run standard Unix commands to gather machine statistic information.  Due to this new process, you must ensure that you have a valid account that you can telnet into.  In addition, you must ensure that the account you are using allows all the SiteScope commands to be executed.  You can see a list of the commands SiteScope uses within the files in the C:\<SiteScope>\templates.os folder.

    • Login and Password
    • [Optional] Modify the waiting prompt on the Advanced Options.

     

    7.      Click on “Add Remote Server.”  An automated test process to make sure SiteScope can access the machine is performed.

    8.      Click on “Back to Remote Machines.”

    9.      Click on “Return to Choose Servers.”

    10.  Choose the server created from the “Server” drop-down list.

    11.  Click on “Choose Server.”

    12.  Change the update time to 15 seconds.

    13.  Click on “Add Monitor.”

     

    You have now added a Unix CPU monitor to SiteScope.

     

     

    How to add an additional monitor to a group

     

    Example:

     

    Steps to add a Memory monitor:

    1.      Click on “Add a New Monitor to this Group.”

    2.      Click on “Add Memory Monitor.”

    3.      Choose the server that you added previously.

    4.      Change the update time to 15 seconds.

    5.      Click on “Add Monitor.”

     

    You have now added a Unix Memory monitor to SiteScope.

     

     

    .


    Setting up a SiteScope Unix Monitor in the Controller

     

    Note: If you have LoadRunner 7.5 SP1, you need to apply LR_New_SiteScope_Monitor.exe as explained in the Requirements section. This is not required for later releases.

     

    1.      In the Controller, look for the SiteScope monitor in the System Resource Section.

     

    2.      Display the graph by dragging it to the right.  Right-click in the graph and select “Add Measurement(s).”  You should now see the SiteScope Dialog box.

     

    3.      Click on the first “Add” button.  For the machine name, type in the IP address or the machine name of the system on which SiteScope is installed.  Click <OK>.

     

    4.      Click on the Second “Add” button.  You should now see a SiteScope Monitor Configuration window.  In the left pane, you should see a tree with the monitors you have added into the SiteScope application.  Simply highlight the available monitors and choose the counters in the right pane.  Click <OK> to get out of the menus.

     

    5.      You have now set up the New UNIX SiteScope monitor.

  • LoadRunner 如何监控MySQL的方法

    2008-08-10 10:59:17

       在LoadRunner中没有提供直接监控MySQL的方法,但是在实际工作中需要我们对mysql数据库服务器进行监控,我们可以利用sitescope监控然后在lr中显示SiteScope监控的结果,达到间接监控mysql的目的。

       备注:Mercyry SiteScope 介绍:它是一款无代理监测解决方案,可确保分布式IT基础架构——如服务器、操作系统、网络设备、网络服务、应用和应用组件的可用性和性能。这款主动的、基于Web界面的基础架构监测解决方案是非常简洁的,而且完全根据客户度身定制,无需在您的上线系统中增加额外的代理。
    SiteScope为上线系统提供24×7的监控服务,为维护工程师及时发现问题提供帮助,确保系统架构内一切组建的正常运作。SiteScope在大量增加检测周期的同时也降低了维护人员的工作成本 。
    SiteScope能够监控UNIX服务器资源、windows服务器资源、weblogic应用服务器、IIS应用服务器、Oracle数据库、SQLServer数据库、F5、URL地址、Ping、内存、CPU、磁盘空间、服务等等系统架构内各种组建的运行状况;监控器按照指定频率对目标进行检测,一旦发现异常会及时向管理员发送意外事件的报警,警报可以通过声音提醒、email、短信等方式发送;另外,SiteScope还可以生成监测活动的汇总报告,该对象从日志文件中读取历史信息,接着总结、筛选信息,并生成图表格式的报告。

       SiteScope利用Database Query monitor监控指定的数据库,通过SiteScope监控器的SHOW STATUS 命令,获得相应数据,命令如下:

      show status where variable_name like ’innodb_buffer_pool_pages_total’

      为了确保监控请确认LoadRunner and SiteScope之间的端口, SiteScope和MySQL必须打开TCP 8888TCP 3306 . 还有SiteScope要监控必须要确保有JDBC的安装。 

    以下为监控前需要注意的地方:

      1. SiteScope to be deployed.
      2. Sufficient license points for Database Query monitor.
      3. TCP 8888 (default) opened two-way for LoadRunner to SiteScope.
      4. TCP 3306 (default) opened two-way for SiteScope to MySQL.
      5. Monitoring privileges for SiteScope to monitor MySQL.
      6. JDBC driver to be installed on SiteScope.
      7. Have knowledge of the counter you want to monitor.

    转自SiteScope帮助:

    Monitoring mySQL Databases

    Monitoring a MySQL database requires the use of a JDBC driver. To enable SiteScope to monitor a MySQL database:

    1. Download the JDBC driver from http://www.mysql.com/downloads/api-jdbc.html
    2. Uncompress the distribution file
    3. Among all the other files, you should find a file with a .jar extension.
    4. Copy the .jar file into the <SiteScope install path>/SiteScope/java/lib/ext directory
    5. Stop and restart SiteScope
    6. Now, use your browser to add a Database Query Monitor within SiteScope.

      The Database Connection URL format for the MySQL JDBC driver is:

      jdbc:mysql://<database hostname>[:<tcp port>]/<database>

      For example to connect to the MySQL database "aBigDatabase" on a machine using the standard MySQL port number 3306 you would use:

      jdbc:mysql://206.168.191.19/aBigDatabase

      If you are using a different port to connect to the database then you should include that port number as part of the IP address.

      The specification for the MySQL JDBC driver is: org.gjt.mm.mysql.Driver

      Enter this string into the Database Driver text box under the Advanced Options section of the Add Database Query Monitor form.

      

    除此之外还可以利用Mysql 提供的监控接口 ,编写dll 然后利用lr中用户定义监控器进行监控,由于最近时间比较忙,忙过这段时间在提供demo例子。

  • 老婆测试工具培训记 - LoadRunner 技巧篇 - 2

    2008-08-07 17:59:06


    . 命令行打开LoadRunner

       在多个场景需要运行的时候,可以通过批处理循环运行场景,保存结果到指定文件夹:

       bat内容:

    set LR_HOME=C:\Program Files\Mercury\LoadRunner
    for /L %%iScenario   in (1,1,10) do "%LR_HOME%\bin\Wlrun.exe" -Run -TestPath "%LR_HOME%\scenario\memory_leak_crash.lrs" -ResultName C:\LR_Result\result%%iScenario

    . 既可以验证请求的正确性又Vさ玫秸返氖奔?/FONT>

      由于lr的http 200的经典错误,所以需要加入验证点,如果加入了验证点,就使事务响应时间大于实际的响应时间,如何解决呢,利用lr_waste_time解决,代码如下。

       double time_elapsed, duration, waste;

       merc_timer_handle_t timer;

       lr_start_transaction("sampleTrans");

       web_url("index.htm",
               "URL=http://localhost/index.htm",
               "TargetFrame=",
               "Resource=0",
               "RecContentType=text/html",
               "Referer=",
               "Snapshot=t1.inf",
               "Mode=HTML",
               LAST);

       timer = lr_start_timer();

       // Do some checks the duration of which is not to be included in the transaction.

       web_image_check("ImgCheck1",
               "src=index_files/image002.jpg",
               LAST);

       web_image_check("ImgCheck2",
               "src=index_files/planets.gif",
               LAST);

       // How long did the tests take in seconds.

       time_elapsed = lr_end_timer(timer);

       // Convert to millisecond.s

       waste = time_elapsed * 1000;

       // Remove the time the checks took from the transaction.

       lr_wasted_time(waste);

       lr_end_transaction("sampleTrans", LR_AUTO);

     

  • 老婆测试工具培训记 - LoadRunner 技巧篇 - 1

    2008-08-06 23:00:34

        

          性能测试是一件非常严谨的事情,很多人在做性能测试的时候只是关注工具如何去用而很少关心如何去做好性能测试的准备,建模等工作。以下是在性能测试中lr模拟的一些常见问题。

         .网络带宽问题。

         对Web进行压力测试时,通常百兆网络是不够的,当网络带宽不够的时候server端没有足够压力。用LoadRunner所在的Windows的性能管理器看一下网络利用率就知道了。

         .Vuser脚本的检查。

         Loadrunner提供了方便的脚本录制功能,但由于录制时可能出现的操作错误,vuser访问一些不存在的资源。去除某些与压力测试无关的东西。否则可能会出现Loadrunner测试结果有误或压力上不去的情况

        .Runtime setting。

        在创建Loadrunner scenario时,每台机器的vuser的runtime setting都应该分别设置并检查,不能只对第一个vuser的runtime setting进行设置。通常你会关掉think time,以便能用较少的机器达到较大的压力。另外,如果返回页面里包含了一些访问其它资源的链接比如图片服务器,这时应关掉 download non-html resources。

        .没有检查返回页面。

        当server端出错时应用程序有可能返回错误信息,但对HTTP来讲仍是成功的响应,返回码为200 O.K. 这样在Loadrunner就被记为成功的transaction。于是,server端出错越多,Loadrunner测出的性能越好。解决办法:开启并检查应用的错误日志;或者启用Loadrunner的返回内容检查功能。

        .当心Loadrunner所在机器的磁盘空间。

         缺省情况下Loadrunner会把运行结果的详细信息放在C盘的Documment and Settings的用户目录下,当大压力长时间运行或有大量出错时,Loadrunner会生成大量的数据到该目录下。当磁盘空间满了后,机器的响应将变得很慢。


  • LoadRunner监控服务器系列 - How to set up the Microsoft .NET CLR monitor

    2008-08-01 08:17:16

     Requirements

    1.      LoadRunner 7.8 Feature Pack 1 or above. 

    2.      Controller machine must have a full installation of LoadRunner.

    3.      To use the monitor, you need the license for the Microsoft .NET CLR.

    4.      The server machine must have the Microsoft .NET Framework version 1.1 installed.

    5.      Supported on all Windows OS including Windows 2003.

     

    Installation

     

    1.      For LoadRunner8.0

    For LoadRunner8, you do not need to install any additional component on the controller machine. However, on the .Net Server machine, you need to run Mercury’s ‘Microsoft .Net Server Monitor Probe’ to configure the .Net Server machine for .NET monitoring. To install the .Net Probe component,

    a.       Locate the LoadRunner Addin installation CD

    b.      Navigate to \Additional Components\Dot_NetProbe directory

    c.        Run Dot_Net_Probe.exe file.

    Note: If you want to monitor a service on the Microsoft .Net Server machine, you should install LoadRunner’s Net Server Monitor Probe as a service. This is the case when you want to monitor the .Net components running under the IIS Web server. To install the probe as a service, you just enter the domain, user name, and password at the install.

     

    2.      For LoadRunner 7.8

    1. Apply LoadRunner Feature Pack 1 on all the LoadRunner machines.
    2. On the Microsoft .Net Server machine, run <Dot_Net_Server_Add-in.exe>. To obtain this file, run the UpdateService (Start à Programs à LR à UpdateService) and select ". Net monitor - server side installation." from a machine with LoadRunner7.8 or 7.8 FP1 install

    Note: If you want to monitor a service on the Microsoft .Net Server machine, you should install LoadRunner’s .Net agent as a service. This is the case when you want to monitor the .Net components running under the IIS Web server. To install the .Net agent as a service, you just enter the domain, user name, and password at the end of the server side installation.

     

     

     

     

     

     

     

     

     

    Configuring the Microsoft .NET CRL monitor

    Microsoft .NET Server Setup

    To monitor Microsoft .NET server performance, you must first install the Microsoft .NET Server Monitor Probe on the server machine, and select the components (applications and assemblies) for .NET profiling:

     

    1.      On the .NET server machine, select the .NET Monitor Configure program from the Windows Start menu. The .NET Monitor Configure window opens.

    2.      Click <Add>, select a .NET executable or assembly file to profile, and click <Open>. The selection is displayed in the .NET Monitor Configure window.

     

    Field

    Descrīption

    Applications and assemblies enabled for profiling:

    Displays the applications and assemblies that are selected for .NET profiling.

    Add

    Click this button to select an application for profiling.

    Remove

    Click this button to remove the selected application.

    Save

    Click this button to save the displayed applications and profiling.

    Enable/Disable Profiling:

    Profiling enabled

    Select this option to enable profiling. Profiling may slow down system performance. Use this option to enable or disable .NET profiling.

    To ensure that changes to this option take effect immediately, reboot the computer, or log out and log back in.

    3.      Click <Add>, select a .NET executable or assembly file to profile, and click <Open>. The selection is displayed in the .NET Monitor Configure window

    4.      Click <Save>.

    5.      Enable or disable profiling, and click <Close>.

    LoadRunner Controller Setup

     

    1.      Click on the Microsoft .NET CLR graph in the graph tree, and drag it into the right pane of the Run view.

     

    2.      Right-click the graph and choose "Add Measurements."

     

    3.      In the Monitored Server Machines section of the Microsoft .NET CLR dialog box, click <Add> to enter the server name or IP address of the machine you want to monitor. Select the platform on which the machine runs, and click <OK>.

     

    Note: To connect to the monitor over a firewall, enter the server name or IP address of the machine you want to monitor, according to the following format:

    <MI Listener machine>:<server machine key>

    Example: 111.111.111.111.ServerLocalMachineKey

     

    4.      In the Resource Measurements section of the Microsoft .NET CLR dialog box, select the server running .NET and click <Add>. The .NET Performance Monitors dialog box opens displaying the available measurements

     

     

    5.      Browse the Measured Components tree, and check the required performance counters in the .NET Performance Monitors window's right pane.

     

    6.      To activate the Microsoft .NET CLR monitor, click <OK> in the .NET Performance Monitors dialog box and in the Microsoft .NET CLR dialog box.

     

    Note: The data sampling rate for the .NET monitor is fixed (five seconds) and cannot be modified using the Controller Tools à Options à Monitors dialog.

     

    Performance Counter

    Application Level

    Measurement

    Descrīption

    Application Lifetime

    Monitors the duration of the application in seconds.

    Exception Frequency

    Monitors the number of exceptions per second, in the five second polling period.

    JIT (Just In Time) Duration

    Monitors the time, in seconds, it takes for the JIT to compile code.

    Thread Creation Frequency

    Monitors the number of threads that are created in a polling period.       

    Thread Lifetime

    Monitors the duration of threads.

    Domain Creation Frequency

    Monitors the number of domain creations in a polling period. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).

    Domain Load Time

    Monitors the time it takes to load a domain. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).

    Domain Unload Time

    Monitors the time it takes to unload a domain. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).

    Domain Lifetime

    Monitors the duration of a domain. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).

    Module Creation Frequency

    Monitors the number of modules that get created in a polling period. (Modules are groups of assemblies that make up a DLL or EXE.)

    Module Load Time

    Monitors the time it takes to load a module. (Modules are groups of assemblies that make up a dll or exe.)

    Module Unload Time

    Monitors the time it takes to unload a module. (Modules are groups of assemblies that make up a dll or exe.)

    Module Lifetime

    Monitors the duration of a module. (Modules are groups of assemblies that make up a dll or exe.)

    Garbage Collection Duration

    Monitors the duration between the start and stop of Garbage Collection.

    Garbage Collection Frequency

    Monitors the number of breaks for Garbage Collections in a polling period.

    Unmanaged Code Duration

    Monitors the duration of the calls to unmanaged code.

    Unmanaged Code Frequency

    Monitors the number of calls to unmanaged code.

    Assembly  Level

    Measurement

    Descrīption

    Assembly Creation Frequency

    Monitors the number of assembly creations in a polling period. (Assemblies hold the .NET byte code and metadata).

    Assembly Load Time

    Monitors the time it takes to load an assembly. (Assemblies hold the .NET byte code and metadata).

    Assembly Unload Time

    Monitors the time it takes to unload an assembly. (Assemblies hold the .NET byte code and metadata).

    Assembly Lifetime

    Monitors the duration of an assembly. (Assemblies hold the .NET byte code and metadata).

    Class Level

    Measurement

    Descrīption

    Class Lifetime

    Monitors the duration of a class.

    Class Load Time

    Monitors the time it takes to load a class.

    Class Unload Time

    Monitors the time it takes to unload a class.

     

    Method Level

    At the method level, the measured time is per method, exclusive of other methods, calls to unmanaged code, and garbage collection time.

    Measurement

    Descrīption

    Method Duration

    Monitors the duration of a method.

    Method Frequency

    Monitors the number of methods called in a polling period.

     

  • LoadRunner Vugen 脚本文件

    2008-07-28 22:48:06

        LoadRunner用VuGen创建脚本的时候将建立一些文件,这些文件对vugen或Controller都是必需的。
    例如,有脚本名字为Login ,两个Actions,Home和Login,将产生如下文件:
    • Login.usr:.usr文件设置那些ACTION被调用,使用哪些协议等
    • default.usp:包含run logic的设置
    • default.cfg:包含run-time settings 设置(除了run-logic设置) 
    • globals.h:全局头文件 
    • Home.c :包含代码的文件
    • login.c :包含代码的文件
    • vuser_init.c :包含代码的文件
    • vuser_end.c :包含代码的文件
    • Login.prm:包含参数定义

         *.dat: 参数数据文件,你可以保存待任意位置,甚至映射到其他服务器上的驱动器

       vugen回放时创建的文件如:*.txt, *.log, *.idx, *.bak, result*, pre_cci.c, combined_*, *.ci 等文件都可以删除,你不需要担心他们对你的脚本有影响。

  • LoadRunner监控服务器系列 - How to set up the Citrix monitor

    2008-07-10 21:51:33

    Solution: The Citrix monitor requires the LoadRunner Citrix add-in patch

    Requirements
    1. LoadRunnner version 7.51 SP1 or above:


    LoadRunner 7.6 and above: No patches required
    LoadRunner 7.51 SP1:
    a.Apply Citrix_ICA_Add-in.exe.
    牋?Note: Do not apply 6.21.031.zip from this patch.
    b. Apply Citrix_patch_27.exe and Citrix clients 6.30.1060.
    2. Citrix client:

    LoadRunner7.8 FP1 and higher: With this version, use the regular Citrix ICA client, version 7.1; Please contact Citrix Customer Support for a copy of the client.
    Note: Citrix ICA client 6.x ? 7.0 are not recommended. The latest client, Citrix 8.0 is currently NOT supported.

    LoadRunner 7.6: Install the client from the LoadRunner installation CD\add-ins\Citrix Client folder.
    LoadRunner 7.51 SP1: Install the Citrix client (6.30.1060.zip) from LoadRunner's Patches database under LoadRunner -> LR7.51SP1 -> Citrix -> LR751SP1P27.
    Supported Citrix Citrix MetaFrame versions


    MetaFrame XP

    MetaFrame 1.8
    Setup
    1. LoadRunner uses the same username/password as the Controller machine to log into the Citrix server. Therefore, make sure you have the same set of username/password on the Citrix machine. You can also map a network drive from the Controller machine to the Citrix server to ensure that the required authentication is provided to the Controller to access the resource counters.

    2. Make sure that "Network DDE" service is started on the Citrix Server. To start the "Network DDE" service:
    a. Go to Start -> Settings -> Control Panel -> Control Panel -> Administrative Tools -> services.
    b. Right mouse click on "Network DDE", and select .

    3. Make sure that "Remote Registry" service is started on the Citrix Server . To start the "Remote Registry " service:
    a. Go to Start -> Settings -> Control Panel -> Administrative Tools -> services.
    b. Right mouse click on "Remote Registry ", and select .


    Verification
    Launch PerfMon from the Controller machine to enable the counters on the Citrix server. Go to Start -> Programs -> Administrative Tool's -> Performance Monitor (PerfMon) from the Controller machine to enable the counters on the Citrix server. If you have problems with this, you need to contact your system/network administrator to make this object available to see from PerfMon. This allows you to monitor the same counters for the ICA Session object on LoadRunnenr's Citrix monitor.

    Monitor
    To provide the Controller with a list of measurements that will be available for monitoring, you must first initialize Vusers before running the scenario. After you have initialized the Vusers, you can then configure the Citrix Monitor and add the ICA Session counters.

    Additional Information
    1. When monitoring a counter under the ICA Session object, please be sure that at least one session is currently connected to the server. Otherwise, you will not be able to add any counters.
    2. Measurements that monitor instances are valid for the currently running Citrix session only. If you run this scenario again, you will need to reconfigure the measurements that are instance-oriented.
    3. For further details and step-by-step information, please refer to LoadRunner's Controller's books online.

  • LoadRunner监控服务器系列 - Solution: Setting up the PeopleSoft (Tuxedo) Monitor

    2008-07-09 17:37:04

    Supported Environments
    Tuxedo 6.3 or higher

    Known Limitations
    If Tuxedo 7.1 or later is installed, you can monitor more than one PeopleSoft (Tuxedo) application server at a time. If Tuxedo 6.5 or earlier is installed, you can monitor only one PeopleSoft (Tuxedo) application server at a time.

    Requirements
    1. Make sure that you have LoadRunner 7.8 Feature Pack1 or higher installed on all the machines.
    2. Make sure that the Controller / Tuning Console machine is installed with Tuxedo Workstation client (not a native client). The Tuxedo workstation client, also called App Designer is either part of the Tuxedo installation or the PeopleSoft client installation. Please check with PeopleSoft regarding how to obtain the same.

    Note: A Tuxedo workstation client communicates with the application server over the network, and is not required to run the Tuxedo application server on the same machine. A native client can only communicate with the Tuxedo application server if it is part of the relevant Tuxedo domain. )
    3. Define the Tuxedo environment variables on the Controller / Tuning Console machine:
    a. Create and set the TUXDIR variable to the Tuxedo installation directory
    b. Create and set the NLSPATH variable to contains subdirectories to support the localisation of system messages along with message catalogues for the default locale
    b. Add the Tuxedo bin directory to the PATH variable.

    Example:
    PATH = <Tuxedo>\bin
    TUXDIR =<Tuxedo>
    NLSPATH =<Tuxedo>\local\c
    4. Ensure that the workstation listener (WSL) process is running. This enables the application server to accept requests from workstation clients. Note that the address and port number used to connect to the application server must match those dedicated to the WSL process.
    Logon Information
    If you do not have the logon information, you can find it out by recording against a utility that that comes with PeopleSoft. You need to install this tool, and do a Tuxedo or a PeopleSoft-Tuxedo recording against it.


    For PeopleSoft 7.5 or below, the utility is called PeopleTools.

    For PeopleSoft 8.0 or above, the utility is called Application Designer.
    On recording, just login to the server and stop the recording. This will generate a tpinit.ini file in the scrīpt folder; you can use the information on this file in the Controller / Tuning Console to connect to the Tuxedo server and get the resources for the Tuxedo Monitor. The tpinit.ini file should look similar to this:
        [Logon]
        [LogonServer=//psft1:7000
        [LogonUserName=tester
        [LogonPassword=__asdnasdqwenqwekpqwnenwic
        [LogonExtra1=clarify
        [LogonExtra2=__asdnasdqwenqwekpqwnenwic
        [LogonExtra3=

    Configuring the PeopleSoft (Tuxedo) Monitor in Controller
    1. In the Controller, right-click on the PeopleSoft(Tuxedo) Monitor graph and select 'Add measurements.'
    2. Click on the first 'Add' button to add the machine on which the Tuxedo server is installed. Give the name of the machine and the OS then click 'OK'.
    3. Click on the second 'Add' button, this should open a dialog asking for information like server name, login, etc. and it should also have a Browse button.
    4. You can fill up the information manually, or click on the Browse button and browse to the folder where the newly created tpinit.ini file is stored, select it, and click 'OK'. That should connect to the Tuxedo server and you should be able to add resources.
        Note: The format of the server name is //<machine name>:<port number>.
    5. To authenticate the PeopleSoft (Tuxedo) monitor, click 'Advanced', and enter the authentication data as a hexadecimal string (beginning with ?x? in the Data field. The authentication data value can be obtained from the tpinit.ini file of an existing Tuxedo scrīpt.
    6. Click 'OK'. The 'Add' PeopleSoft (Tuxedo) Measurements dialog box opens.
    7. For each measurement, select an object, measurement, and instance, and then click 'Add'
    8. When you have finished adding measurements, click 'Close'.
    9. In the PeopleSoft (Tuxedo) dialog box, click 'OK'.

    Configuring the PeopleSoft (Tuxedo) Monitor in Tuning Module
    Note: This is only available with LoadRunner8.0 and higher.
    1. Click 'Monitors' to open the 'Monitors Configuration' dialog box.
    2. From the Server list, choose the server running PeopleSoft.
    3. Click 'Add Monitor' and select 'Show All Available Monitors'. The 'Select Measurements to Monitor' dialog box opens, displaying all the available monitors.
    4. In the left section of the dialog box, expand the 'ERP/CRM Server' category,select 'PeopleSoft (Tuxedo)' , and click 'Add'.
    5. The 'PeopleSoft (Tuxedo) logon' dialog bos opens, asking for information like server name, login, etc. and it should also have a Browse button.
    6. You can fill up the information manually, or click on the Browse button and browse to the folder where the newly created tpinit.ini file is stored, select it, and click 'OK'. That should connect to the Tuxedo server and you should be able to add resources.
        Note: The format of the server name is //<machine name>:<port number>.
    7. To authenticate the PeopleSoft (Tuxedo) monitor, click 'Advanced', and enter the authentication data as a hexadecimal string (beginning with ?x? in the Data field. The authentication data value can be obtained from the tpinit.ini file of an existing Tuxedo scrīpt.
    8. Click 'OK'. The 'Add' PeopleSoft (Tuxedo) Measurements dialog box opens.
    9. For each measurement, select an object, measurement, and instance, and then click 'Add'
    10. When you have finished adding measurements, click 'Close'.
    11. In the Tuning Console, click OK in the Select Measurements to Monitor dialog box, and in the Monitors Configuration dialog box, to activate the monitor.

     

  • LoadRunner监控服务器系列 - Solution: Setting up the SAP monitor

    2008-07-09 17:35:05

    Server:


    The SAP monitor supports SAP R/3 server versions 3.1 to 4.6 (Kernel release 46D and below).
       Problem ID 30060- Which LoadRunner monitor can be use for SAP application
    Set up a user ID in SAP for LoadRunner. This user ID must have access to the st03 transaction (st04 if monitoring st04 transaction). Otherwise, no metrics will be returned even though LoadRunner is able to connect.
    Controller:

    You need to have LoadRunner7.02 or above. For monitoring against st04 transaction, however, you need
    LoadRunner 7.5 or higher
    QTSAP 7.3 build 170 or above
    Install the Virtual User add-in on the Controller machine for LoadRunner 7.5 and 7.51. This is not required for 7.6 or above.
    You need to have license for SAP monitor. If not, please contact your local Sales Representative.
    SAPGUI 6.2 client or below installed on the Controller machine.
    Make sure that you use the user ID with access permission (refer to the server section) to the st03 and/or st04 transaction:
    1. Open SAP and login with the user ID.
    2. There is a text box in the top left corner where you can type in a transaction.
    3. Type in st03 or st04.
    4. If a screen comes up with metrics or choices for metrics, LoadRunner should be able to monitor SAP.

    Adding the SAP monitor from the Controller:
    1. In the Controller, look for the "SAP" monitor in the ERP/CRM Server Resource Section.
    2. Display the graph by dragging it to the right. Right-click in the graph and select "Add Measurement(s)." You should see the "SAP" monitor window.
    3. In the Monitored Server Machines section of the SAP dialog box, click <Add> to enter the server name or IP address of the machine you want to monitor. Select the platform on which the machine runs, and click <OK>.

    Note:
    You can also specify a system number and IP address in the Add Machine dialog box using the following format:

       <IP address:system number>

    Example:
    199.35.106.162:00

    4 Click <Add> in the Resource Measurements section of the SAP dialog box. The SAP Monitor Logon dialog box opens. Enter your Login Name, Password, Server Name, and Client.

    Note:
    If you want to connect to the SAP monitor through a router, you need to enter the router string into the Server Name field. A router string has the format:

       <RouterString/ServerIP/S/sapdpxx>

    where


    RouterString has the format /H/<IP_ADDRESS>/H/<IP_ADDRESS>/H/.
    ServerIP is the application server IP address.
    xx is the system number.
    Example:
    router string = /H/199.35.107.9/H/204.79.199.244/H/
    application server IP address = 172.20.11.6
    system number = 00

    You should enter the following string into the Server Name field:
    /H/199.35.107.9/H/204.79.199.244/H/172.20.11.6/S/sapdp00

    5. Click <OK>. The Add SAP Monitor Measurements dialog box will open. Select the counters to add and add them.
    6 Click <OK> in the SAP dialog box to activate the monitor.

  • 性能监控随笔点滴 - pcl

    2008-07-07 17:45:40


     

    吞吐量:

      定义:单位时间内完成工作的度量。
      评估点:在C/S环境中通常是从服务器方进行评估。
      表象:随着负载的增加,吞吐量往往增长到一个峰值后,然后下降,队列变长。
      分析:
          在C/S架构的系统中,吞吐量依赖每个部件的运行,系统地最慢点决定了整个系统的吞吐量,这个点我们称之为瓶颈。一般使用率最高的资源就是瓶颈(但也不总是这样,因为可能这种情况是某种资源正在处理多种请求),只要没有队列就没有瓶颈。
      LoadRunner监控:选择Windows资源监控器,对资源进行监控

    队列:
      
       定义:处理请求排队
       评估点:服务器端进行评估
       表象:对资源的请求的速率大于资源的吞吐量。
       分析:当队列变长,请求不能被有效的处理,响应时间就会变慢。
     
    响应时间:
       定义:从客户端发出请求到服务器端返回最后一个字节的时间
       评估点:通常从客户端来度量(LoadRunner通过事务来度量)
       表象:响应时间通常随着负载的增加而增加(虚拟用户数的增加,请求数的增加)
       分析:可以利用资源的队列的长度除以资源的吞吐量可以计算响应时间
       LoadRunenr:自定义事务是度量的关键,最后分析图中可以通过看平均事务响应时间图分析


    Window性能监控原理

      操作系统本身时时采集系统资源如PhysicalDisk,Memory,CPU,NetWork等数据。缺省情况下,操作系统是通过注册表来收集系统资源。同时它也支持WMI(Window Management Infrastructure)收集数据,
      所以很多性能测试工具都宣称是通过无代理进行性能数据采集,在window平台上基本上所有的工具都可以做到(其他平台有些工具就不能达到loadrunner无代理方式的性能采集了),
     
       背景知识:在WMI出现之前,所有的 Windows管理工具都依赖于 Win32 应用程序编程接口(Application Programming Interfaces,APIs)来访问和管理 Windows 资源。因为在 WMI 之前,能够以编程方式访问 Windows 资源的惟一方法就是通过 Win32 API。这种情况使 Windows 系统管理员无法通过一种简便的方法利用常见的脚本语言来自动化常用的系统管理任务,因为大多数脚本语言都不能直接调用 Win32 API。通过提供一致的模型和框架,WMI 改变了这种情况 — 通过模型和框架,所有的 Windows 资源均被描述并公开给外界。最好的一点是,系统管理员可以使用 WMI 脚本库创建系统管理脚本,从而管理任何通过 WMI 公开的 Windows 资源!


    例子代码:WMI脚本检索远程计算机上安装的物理内存量
    strComputer = "pcl"

    Set wbemServices = Getobject("winmgmts:\\" & strComputer)
    Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")

    For Each wbemObject In wbemObjectSet
        Wscrīpt.Echo "Total Physical Memory (kb): " & wbemObject.TotalPhysicalMemory
    Next

    定位瓶颈:
       定位瓶颈是监控整个系统开始,如果某个环节限制了整个系统更快的执行才会存在瓶颈,即使系统中的一个或者多个使用超负荷,但是作为一个整体系统没有受到任何的影响,就不存在瓶颈。

    瓶颈的产生的原因:主要是服务的请求数,请求的频率,请求的持续时间


     

  • 如何用Rational进行压力测试-Test Manager篇

    2008-07-07 10:50:14

                 本篇文章为翻译整理文章。

                 http://www.51testing.com/?72/action_viewspace_itemid_86933.html

  • LoadRunner 代码样例

    2008-07-05 13:31:37

       输出信息到外部文件?

       #include "as_web.h"


    Action()
    {
     long stream;
     char kmp1[6];

     lr_vuser_status_message("Iteration: %s", lr_eval_string("{it_number}"));

     if( (stream = fopen( "D:\\LTProjects\\Log\\order1.txt", "a" )) == NULL ){
           
        return(-1); 
     }

     lr_output_message("Iteration Number:""%s",lr_eval_string("{it_number}"));
     strcpy (kmp1,lr_eval_string("{it_number}"));
     fprintf(stream,"Iteration number:%s",kmp1);
     fCLose(stream);
     return 0;

    }

      ip欺骗的时候得到主机机器名字?

      #include "as_web.h"


    Action()
    {

    char *my_ip;
    char *my_host;

    my_ip = lr_get_vuser_ip();

    my_host = lr_get_host_name( );

    web_url("yahoo.com",
    "URL=http://yahoo.com/",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=",
    "Snapshot=t1.inf",
    "Mode=HTML",
    LAST);

    lr_output_message("The IP address is %s", my_ip);

    lr_output_message("Host IP address is %s", my_host);
     return 0;
    }

362/2<12
Open Toolbar