exchange stress and performance tool 2003

142
Exchange Server Stress and Performance 2003 Tool Published: September 2003 Updated: August 2004 Applies To: Exchange Server 2003 Service Pack 1

Upload: bisilo1

Post on 02-Jul-2015

171 views

Category:

Documents


0 download

TRANSCRIPT

Exchange Server Stress and Performance 2003 ToolPublished: September 2003 Updated: August 2004 Applies To: Exchange Server 2003 Service Pack 1

CopyrightThe information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. 20032004 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, ActiveSync, MSDN, Outlook, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Exchange UE Writer: Jon Hoerlein Project Editor: Diane Forsyth Graphic Design: Kristie Smith Production: Sean Pohtilla

Table of Contents

Exchange Server Stress and Performance 2003 Tool.................................1 Table of Contents.......................................................................i Introduction...............................................................................1 Supported Protocols..................................................................1 System Requirements...............................................................2 When to Use ESP 2003..............................................................2 Installing ESP 2003....................................................................2 Configuring ESP 2003 on a Client Computer.............................3Creating Workspaces and Hosts................................................................4 Establishing Connections...........................................................................5 Configuring Hosts......................................................................................5 Installing Test Modules..........................................................................................5 Configuring the Connection to the Host................................................................6 Customizing Test Configuration Properties............................................................7 Configuring Test Modules..........................................................................8 Configuring Module Properties and Committing Them..........................................9 Configuring Module Parameters............................................................................9 Configuring Logging and Performance Monitor Options for a Module......10 Saving the Workspace.............................................................................11 Restoring the Workspace.........................................................................11 Running Test Modules..............................................................................12 Stopping Modules....................................................................................12 Command Line Parameters......................................................................12

Setting up the Test..................................................................13 ESP Modules............................................................................13Common Infrastructure............................................................................14 WebDAV Module for ESP..........................................................................14 Run-time Parameters..........................................................................................15 Configuration.......................................................................................................17 Statistics..............................................................................................................18 Script Verbs Specific to This Test Module and ESP Keywords..............................19 Reserved Variables Specific to This Test Module.................................................24 Commands Specific to This Test Module.............................................................25 How to Script WebDAV Verbs..............................................................................26 Sample Suites.....................................................................................................28 Simulating an Exchange Server 2003 User..........................................................35

ii Exchange Server Stress and Performance 2003 Tool

IMAP4 Module for ESP..............................................................................36 Run-time Parameters..........................................................................................37 Statistics..............................................................................................................38 Script Verbs Specific to This Test Module............................................................39 Commands Specific to This Test Module.............................................................42 Example Scripts...................................................................................................44 Simulating an Exchange Server 2003 User..........................................................45 LDAP Module for ESP................................................................................50 Parameters..........................................................................................................50 Statistics..............................................................................................................51 Script Verbs Specific to This Test Module............................................................52 Commands Specific to This Test Module.............................................................55 Example Script....................................................................................................57 OLEDB Module for ESP.............................................................................57 Run-time Parameters..........................................................................................58 Script Verbs Specific to This Test Module............................................................58 Commands Specific to This Test Module.............................................................70 POP3 Module for ESP................................................................................71 Run-time Parameters..........................................................................................71 Statistics..............................................................................................................72 Script Verbs Specific to This Test Module............................................................73 Commands Specific to This Test Module.............................................................75 Example Scripts...................................................................................................75 Simulating an Exchange Server 2003 User..........................................................75 SMTP Module for ESP...............................................................................78 Run-time Parameters..........................................................................................78 Statistics..............................................................................................................79 Script Verbs Specific to This Test Module............................................................79 Commands Specific to This Test Module.............................................................81 Example Scripts...................................................................................................82 Simulating an Exchange Server 2003 User..........................................................84 NNTP Module for ESP...............................................................................85 Run-time Parameters..........................................................................................85 Statistics..............................................................................................................86 Script Verbs Specific to This Test Module............................................................86 Commands Specific to This Test Module.............................................................89 Sample Script......................................................................................................89 Outlook Mobile Access Browse Module for ESP........................................89 Installation..........................................................................................................89 Adding the Mobile Browse Module.......................................................................92 Statistics..............................................................................................................93 Script Verbs Specific to This Test Module............................................................94 Variables Specific to This Test Module.................................................................94 Scripting With the Mobile Browse Module............................................................95 Example Script....................................................................................................96 Debugging Script Errors......................................................................................97

Exchange Server Stress and Performance 2003 Tool iii

Simulating an Exchange 2003 User.....................................................................98 Mobile Synch Module...............................................................................99 Adding the Mobile Synch Module.........................................................................99 Run-time Parameters..........................................................................................99 Statistics............................................................................................................100 Script Verbs Specific to This Test Module..........................................................101 Script Functions ................................................................................................106 Script Object......................................................................................................107 Example Script..................................................................................................107 Simulating an Exchange Server 2003 User........................................................108

Additional Resources.............................................................109Microsoft Knowledge Base Articles.........................................................110 Other Microsoft Exchange 2003 Tools....................................................110

Introduction

Microsoft Exchange Stress and Performance (ESP) 2003 (also known as Medusa) is a highly scalable stress and performance tool that you can use to stress test Microsoft Exchange Server 2003. ESP includes multiple modules and can simulate many client sessions while accessing one or more Exchange servers at the same time. You can use ESP to test several workload scenarios. You can run an unlimited number of ESP modules from a single computer to more realistically simulate physically separate client computers. Alternatively, you can run ESP modules from separate computers at the same time. Therefore, the load you can apply to your test environment is limited only by the available hardware. Depending on the hardware and workload imposed by each script, you can simulate 5,000 or more end users on a single host computer. NoteThe ESP tool cannot create user accounts. Therefore, to create a test that involves simulating actual individual users, and not only client sessions, it is recommended that ESP be used with other tools that can create user accounts (for example, Load Simulator 2003). For more information about using ESP with other programs that create actual user objects, see "Setting up the Test" later in this document.

ESP is modular and extensible. Currently modules are provided that enable you to test stress that is applied for most Internet protocols. ESP does not include a module to test stress. This test is applied by MAPI (Microsoft Office Outlook) clients.

Supported Protocols

ESP includes modules that can simulate client sessions over the following Internet protocols/APIs: WebDAV (Outlook Web Access) Internet Message Access Protocol version 4rev1 (IMAP4) Lightweight Directory Access Protocol (LDAP) OLEDB Network News Transfer Protocol (NNTP) Post Office Protocol version 3 (POP3) Simple Mail Transfer Protocol (SMTP) Outlook Mobile Access Synchronization Support Outlook Mobile Access Browser Support

2 Exchange Server Stress and Performance 2003 Tool

System Requirements

To use ESP 2003, you must comply with the following requirements. Note that these requirements can increase if you use custom e-mail messages and custom configurations (Table 1). Table 1 ESP 2003 system requirements Components Processor Operating system Memory Available hard disk drive Display Minimum Intel Pentium Pro or compatible 200-megahertz (MHz) or greater processor Microsoft Windows 2000, Microsoft Windows XP, or Microsoft Windows Server 2003 256 megabytes (MB) of RAM 10 MB SVGA (800 x 600) or greater resolution monitor

When to Use ESP 2003

ESP 2003 simulates users using non-MAPI protocols, also named Internet protocols. ESP 2003 cannot simulate MAPI stress. ImportantESP 2003 should be used only in a test environment not connected to the production environment.

Installing ESP 2003

ESP 2003 runs only on Windows 2000 operating system, Windows XP operating system, and Windows Server 2003.

Exchange Server Stress and Performance 2003 Tool 3

To install ESP1. 2. 3. 4. 5. In the Setup folder on the ESP download package, run MSETUP.EXE. In ESP Setup, under Destination Folder, note the default location to which ESP 2003 will be installed. To change the location, click Browse, and then navigate to the location that you want. To begin the setup process, in ESP Setup, click Install. In ESP Service Account, type a password for the ESP service account that will be created during ESP Setup, and then click Continue. In ESP Setup, click OK to the message indicating that ESP components have been installed on your computer. NoteIf you plan to run ESP modules remotely on Windows 2000 computers, you will also have to run DCOMCNFG.EXE to manually configure DCOM settings. See the README.TXT for details. The ESP Module Wizard requires Visual C++ 6.0 or later, Enterprise or Professional editions.

Configuring ESP 2003 on a Client Computer

The ESP user interface is used to manage, configure, and run the Exchange COM tools components.

To start ESP 20031. 2. Log on the computer where ESP 2003 is installed. Start ESP 2003 (esp.exe). Click Start, point to All Programs, point to ESP, and then click ESP. ESP opens showing an unsaved workspace named untitled.ini. Figure 1 is an example of what the console pane of an ESP 2003 workspace looks like after saving the workspace with a specific name and adding four host computers to the configuration. The workspace name kevb.INI refers to the top-level object. The objects under the top-level object represent host computers that run ESP modules (Figure 1).

Figure 1 An example of an ESP 2003 workspace with four hosts

4 Exchange Server Stress and Performance 2003 Tool

Creating Workspaces and HostsESP components include host computers, modules, and workspaces. Hosts are computers that run modules for your ESP test. Hosts are members of a particular workspace, but the ESP UI refers to each computer as a Host.

To create a new workspace1. 2. In ESP 2003, on the File menu, click New Workspace. A workspace named Untitled.INI displays in the console pane. On the File menu, click Save As. In Save As, under File Name, type a name for the workspace, and then click Save. In ESP 2003, select the workspace to which you want to add a host, and then right-click Add Host. The Add Host dialog box displays (Figure 2).

To add a host computer to the workspace1.

Figure 2 Adding a host to a workspace 2. 3. 1. 2. In Name, type the name of the computer that you want to add as a host to the workspace. Alternatively, click Browse, and then navigate to the computer that you want to add. Click OK. In ESP 2003, in the console pane, select the host that you want to remove. Right-click that host, and then click Delete. NoteIf you remove a host that is currently connected to a workspace, the host will be disconnected immediately and all of its active test modules will be stopped.

To remove a host computer from a workspace

Exchange Server Stress and Performance 2003 Tool 5

Establishing ConnectionsAfter adding hosts to a workspace, you must manually connect to the host computer. Once a connection has been established, you can add ESP modules and configure them to run on the host computer.

To connect to a host computer1. 2. In ESP 2003, select the host computer to which you want to connect. On the Host menu, click Connect. The dialog box appears, which you can use to configure the selected host computer. NoteAfter you establish a connection to a host computer, the host computer name is displayed in bold in the console tree of ESP 2003.

Configuring HostsTo configure each host computer in a workspace, you use the property tabs in the dialog box. This dialog box displays automatically after you add a host to a workspace. You can also display the properties of a host if you right-click a host computer in the console tree of ESP, and then click Properties. The dialog box includes the following tabs: Available Modules tab Target Host tab Options tab

Installing Test ModulesUse the Available Modules tab to specify the modules that you want to run on a host computer.

To specify the modules that you want to run on a host1. 2. In ESP 2003, right-click the host computer to which you want to connect, and then click Properties. On the Available Modules tab, under Installed Modules, select the first module that you want to run on this host, and then click Add. The module you add appears under Add These Modules (Figure 3).

6 Exchange Server Stress and Performance 2003 Tool

Figure 3 The Available Modules tab of the member properties dialog box 3. To add additional modules, repeat the previous step until you have added all of the required modules. You can remove a module that you have added by selecting it and clicking Remove. You can clear all of the added modules by clicking Clear. 4. Click Apply.

Configuring the Connection to the HostYou use the Target Host tab to view and configure the connection information for a specific host. NoteThe options under Remoting (Domain, User Name, and Password) are not functional in this version of ESP 2003. When implemented, these options will enable you to specify a security context for the host computer.

To configure the connection to the host1. 2. In ESP 2003, right-click the host computer to which you want to connect, and then click Properties. On the Target Host tab, in Name, specify the name of the host computer. You can type the name of the computer, or click Browse, and then navigate to the computer to connect to (Figure 4).

Exchange Server Stress and Performance 2003 Tool 7

Figure 4 Target Host tab of the properties dialog box 3. 4. 5. Under Test Duration, click Fixed (minutes), and then type a value if you want a test to run only for a specific amount of time. If you do not select this option, the test will continue to run until it is finished. Select Reconnect at Startup if you want the host to be connected automatically when the workspace is opened. Click Apply.

Customizing Test Configuration Properties You use the Options tab to specify run-time test configuration properties that apply to all of the modules running on a particular host. These test configuration properties include the following: Max Transport Threads The number of ESP transport threads that will be generated to handle IO requests. Archive Log Whether each test-run should generate a uniquely named log file or overwrite the existing log. Log Results Whether the results should be logged to disk. Log File Path The path of the log file.

To change test configuration properties1. 2. In ESP 2003, right-click the host computer that you want to connect to, and then click Properties. On the Options tab, double-click the parameter that you want to modify (Figure 5). The cursor will move to the Value column for the option that you specify.

8 Exchange Server Stress and Performance 2003 Tool

Figure 5 The Options tab of a of the properties dialog box for a workspace 3. Type the value for the parameter that you want to modify.Note If you are specifying the Log File Path, you can either type the path directly or click the Browse button and navigate to the location that you want to specify.

4. Click Apply to save your changes. The host computer tries to accept the new settings and to put the changes into effect. If you apply changes while any test modules are running, the host automatically determines whether it needs to restart the modules.

Configuring Test ModulesWhen you connect to a host computer, all of the installed test modules for that host are listed in the ESP 2003 user interface.

To view the installed modules for a host1. 2. Start ESP 2003 (esp.exe). Click Start, point to All Programs, point to ESP, and then click ESP. In the console tree, expand the host computer object that contains the modules that you want to view (Figure 6).

Exchange Server Stress and Performance 2003 Tool 9

Figure 6 Host computer lest80 with one LDAP module

Configuring Module Properties and Committing ThemYou configure test modules using the property tabs of each individual module object. The two property tabs for ESP modules are Settings and Statistics. Changes to modules must be committed to take effect. You commit changes by using the Apply button on each tab. Alternatively, the changes you configure are automatically committed when you start the test module. The changes are saved before ESP runs the test module.

Configuring Module ParametersYou use the Settings tab to configure parameters for individual modules.

To configure the parameters for a module1. 2. 3. In the console tree, expand the host computer object (Figure 6). Right-click the module that you want to configure, and then click Properties. Alternatively, you can double-click the module. On the Settings tab, double-click the parameter that you want to modify (Figure 7).

10 Exchange Server Stress and Performance 2003 Tool

Figure 7 Settings tab of the LDAP module within a workspace 4. In the Value column, type the value that you want. 5. Click Apply to save your changes.

Configuring Logging and Performance Monitor Options for a ModuleUse the Statistics tab to configure logging and performance monitor options for individual modules. The only statistics options you can configure are whether a statistic is enabled and how frequently a statistic is polled.

To configure a logging or performance counter option1. 2. 3. In the console tree, expand the host computer object (Figure 6). Right-click the module that you want to configure, and then click Properties. Alternatively, you can double-click the module. On the Statistics tab, select the first statistic that you want to modify, and then do the following (Figure 8): In Polling, select Enabled. In Frequency, specify how often you want the data for that statistic to be gathered.

Exchange Server Stress and Performance 2003 Tool 11

Figure 8 Statistics tab of the LDAP module within a workspace 4. Repeat the previous step for all statistics that you are interested in. 5. Click Apply to save changes.

Saving the WorkspaceYou can save the configuration for a workspace (which includes the configuration of all hosts that are currently connected to a workspace) to a workspace .ini file. This enables you to restore and rerun a test later. ImportantThe settings of a host computer are saved to the workspace file only if the computer is connected when the save occurs. For example, if a user connects to the host computer named Host01, makes setting changes to that host, disconnects from the host, and then saves the workspace, the changes for the host computer named Host01 are not saved.

Restoring the WorkspaceYou can restore a workspace by opening the workspace .ini file from a previous test. When you open the workspace, the console pane is restored to display the same host computers that were connected when the file was last saved. Connections that existed during the previous session will not be restored.

12 Exchange Server Stress and Performance 2003 Tool

Running Test ModulesYou can run all modules on a host simultaneously, or you can run modules individually.

To run all modules for a specific host1. 2. In the console tree, ensure that you are connected to the host. Right-click the host object that contains the modules that you want to run, and then click Start All. Alternatively, you can select a host and then use the green traffic light icon on the tool bar to start a test. In the console tree, ensure that you are connected to the host that contains the module you want to run. Right-click the module that you want to run, and then click Start. Alternatively, you can select a module and then use the green traffic light icon on the tool bar to start the module.

To run an individual module1. 2.

Stopping ModulesAfter your modules have started, you can stop an individual module or all of the modules.

To stop all modules for a specific host1. 2. In the console tree, select the host that contains the modules that you want to stop. Right-click that host, and then click Stop All. Alternatively, you can select a host and then use the red traffic light icon on the tool bar to stop a test. In the console tree, expand the host computer that includes the module that you want to stop. Right-click the module that you want to stop, and then click Stop. Alternatively, you can select a module and then use the red traffic light icon on the tool bar to stop the module.

To stop an individual module1. 2.

Command Line ParametersYou can start ESP from the command line to enable batch files to run test passes. You can pass a single parameter on the command line: the name of a workspace file. And, you can pass the following flags shown in Table 2. Table 2 Command line parameters Parameter -unattended Flags Description The workspace file Example ESP D:\tools\.ini

Starts ESP automatically ESP -unattended running in the workspace given D:\Tools\.ini by ESP will run until the last module stops. Used when modules use "Fixed Duration" parameter. ESP -unattended -closeonstop D:\Tools\.ini

-closeonstop

Exchange Server Stress and Performance 2003 Tool 13

Parameter

Flags -regserver -unregserver

Description Called only by setup to register component categories Called only by setup to unregister component categories

Example ESP -regserver ESP -unregserver

Setting up the Test

To set up a realistic test, you need to create users and populate mailboxes with e-mail messages. ESP cannot simulate users, so it is recommended that you use it with tools that have this capability, such as LoadSim 2003 to leverage the capability of creating users and populating mailboxes. For example, if you are using LoadSim 2003 with ESP 2003, it is possible to export a list of users created with LoadSim 2003 from Active Directory directory service.

To export a list of users from Active Directory1. 2. 3. 4. 5. 6. Start Active Directory Users and Computers. Expand the Active Directory Users and Computers console tree to display the Active Directory containers that include the user names that you want to export. Right-click a container for which you want to export user names, click Export, and then save the user names to a file. Open the file to which you exported user names. In that file, delete all data other than the user names. The correct syntax is that only one user name should be listed per line. Repeat Steps 3 through 5 for each Active Directory container for which you want to export the list of users.

ESP Modules

ESP provides a common script language that can be used for all scripts. It also enables each module to extend the language for its own needs.

14 Exchange Server Stress and Performance 2003 Tool

Common InfrastructureThe script verbs shown in Table 3 are common to all ESP modules. Table 3 Common scripts for all modules Reserved Script Verb LOOP Syntax and Example LOOP 1*() // one or more commands ENDLOOP RANDNUMBER RANDLIST SEQULIST RANDNUMBER(, ) RANDLIST() SEQULIST() Generates a random number within the low-high range. Gets a random line from "filename". First evaluation of construct will return first line from file "filename." Second evaluation will return second line from file, and so on. This is done in a circular manner. Returns the same string as the previous SEQULIST() call. Description Loops into the code.

SAMESEQULIST

SAMESEQULIST()

SEQUNUMBER

SEQUNUMBER(, , ID) Each evaluation returns a sequential number in the range - . The range is associated with an ID. Depending on whether n2 > n1 or n2 < n1, you will have an ascending or descending sequence. SAMESEQUNUMBER(, , ID) Returns the same number as the previous SEQUNUMBER call with the same ID.

SAMESEQUNUMBER

WebDAV Module for ESPThis module simulates multiple clients using Web Distributed Authoring and Versioning (DAV). The module supports parameters for configuring different protocol-specific options, options for how the test executes, and security options. Examples are the server this client is targeting or the port number. Client actions are simulated by running a script that contains ESP keywords and DAVCOM verbs. This module supports simple script variables and reports a number of statistics during runtime. Statistics give counts of the number of modules or protocol-specific events (for example, errors, successful or failed connection attempts.) that occur

Exchange Server Stress and Performance 2003 Tool 15

during a test run. You can also log client actions and server responses during a test run. You cannot configure the events that are logged. ImportantThis module requires the use of a specific set of additional script files not required by other modules. These are known as Outlook Web Access suite files. These files are in the C:\Medusa\OWASuite subfolder, where C:\ is the location to which you extracted the ESP 2003 tool (by running Medusa.exe).

For more information about these files, see "Sample Suites" later in this section.

Run-time ParametersThe run-time parameters of Outlook Web Access and a description of each are shown in Table 4. Table 4 Outlook Web Access run-time parameters Parameter Server Script Instances Start Time Delay (ms) Description Server name Number of users Each script instance will be delayed from starting this many milliseconds. Encryption method to use when doing authentication Authentication method Optional/ Required Required Required, > than 0 Required, > than 0 Required Default Blank 1 0 Legal Values 1-n 1-n

Encryption Type

NONE

BASE64 UUENCODE NONE

Authentication Method

Required

NTLM

NTLM DPA MSN KERBEROS BASIC NONE

Authentication Encoding Method HTTP Version

Authentication encoding method HTTP version

Required Required

BASE64 HTTP/1.1

BASE64 HTTP/1.1 HTTP/1.0 HTTP/0.9

Port Number Browser Type Script File

Port number to use when connecting to a server Browser type Script file to run a test

Required Required Required

80 DAV Blank

DAV

16 Exchange Server Stress and Performance 2003 Tool

Parameter Calculate Content Length

Description Can be one of the following: If yes, and there is a second parameter for the script request, the content length will be calculated, and the "Content-Length" header will be added. If yes, and you do not have a second parameter for the script request, the content length will not be calculated, and the "Content-Length" header will not be added. If yes, and the content length of the second parameter is 0 bytes, then the "ContentLength" header will not be added.

Optional/ Required Required

Default YES

Legal Values YES NO

Send Notification

If yes, then error and warning notifications are sent to the ESP user interface notification windowpane.

Required

NO

YES NO

Sleep Duration on Error (ms)

The duration for which Required each script instance (or user) will be delayed (put to sleep) when an internal error occurs, in milliseconds Closes the connection whenever a user wakes up from a sleep. When users are doing long sleeps, this prevents the user from reporting an error when waking up if the server has timed out the socket. Required

1000

0-n

Close Connection on Wakeup

YES

YES NO

Exchange Server Stress and Performance 2003 Tool 17

Parameter Emulate Wininet

Description

Optional/ Required

Default NO

Legal Values YES NO

Forces the module to Required follow Wininet's default behavior when uploading request bodies and using authentication. In this case, prior to the request body being uploaded the connection will be reauthenticated.

Configuration1. 2. 3. 4. 5. 6. Start ESP 2003 (esp.exe). Click Start, point to All Programs, point to ESP, and then click ESP. From the File menu, click Add Host. In Name, type the name of the host computer, and then click Connect Host. On the Available Modules tab, add a DAV module instance, and then click OK. In the console tree, right-click the DAV module just created, and then click Properties. Configure the module to your specifications. For example, enter the server, script instances, authentication method, and script file. You can also change other fields (Figure 9). For example, you can change the value for the parameter "Close connection on wakeup" from YES to NO. Authentication method should be set as NTLM or BASIC.

Figure 9 Settings tab of a DAV module 7. Run the suite by clicking the green traffic light icon.

18 Exchange Server Stress and Performance 2003 Tool

StatisticsTable 5 describes the run-time statistics that are reported to the ESP user interface and an explanation of each. Table 5 Outlook Web Access run-time statistics Statistic Active Connections Successful Connections Failed Connections Authenticated Connections Failed Authenticated Connections Connections Closed by the Server SLEEP Requests POLL Requests SUBSCRIBE Requests UNSUBSCRIBE Requests POST Requests SEARCH Requests TRACE Requests PROPFIND Requests PROPPATCH Requests PUT Requests OPTIONS Requests MOVE Requests MKCOL Requests UNLOCK Requests LOCK Requests HEAD Requests DELETE Requests COPY Requests GET Requests BPROPFIND Requests BPROPPATCH Requests Description Current active user connections Total number of active connections Total number of failed connections Total number of successful authenticated connections Total number of failed authenticated connections Total number of connections that the server closed for no good reason. This is NOT incremented if you get a Connection: close header back from the server. Total number of SLEEP requests Total number of POLL requests Total number of SUBSCRIBE requests Total number of UNSUBSCRIBE requests Total number of POST requests Total number of SEARCH requests Total number of TRACE requests Total number of PROPFIND requests Total number of PROPPATCH requests Total number of PUT requests Total number of OPTIONS requests Total number of MOVE requests Total number of MKCOL requests Total number of UNLOCK requests Total number of LOCK requests Total number of HEAD requests Total number of DELETE requests Total number of COPY requests Total number of GET requests Total number of BPROPFIND requests Total number of BPROPPATCH requests

Exchange Server Stress and Performance 2003 Tool 19

Statistic BDELETE Requests BMOVE Requests BCOPY Requests Unknown Requests 100 Level Status 200 Level Status 300 Level Status 400 Level Status 500 Level Status Unknown Level Status Successful Shutdowns Failed Shutdowns

Description Total number of BDELETE requests Total number of BMOVE requests Total number of BCOPY requests Total number of unknown requests Total number of 100 status-level responses received by the server Total number of 200 status-level responses received by the server Total number of 300 status-level responses received by the server Total number of 400 status-level responses received by the server Total number of 500 status-level responses received by the server Total number of unknown status-level responses received by the server Total number of script instances (or users) that were successfully shutdown Total number of script instances (or users) that did not successfully shut down. If this number is greater than 0, you must quit the ESP userinterface application and restart$bug$ in the Internet transport used.

Script Verbs Specific to This Test Module and ESP KeywordsFollowing are the reserved-word script verbs that are specific to this test module and a description of each (Table 6). Anything specified with the delimiters "" is required. Anything specified with the delimiters "[]" is optional. Table 6 Outlook Web Access reserved-word script verbs Reserved Script Verb ADDHEADER Syntax and Example ADDHEADER ADDHEADER Connection: close DELHEADER DELHEADER < HdrLbl > [HdrVal] DELHEADER Connection: or DELHEADER Connection: close Description Adds headers for any DAV commands that follow it until the header is deleted. Deletes a header so that it is not sent with the server request.

20 Exchange Server Stress and Performance 2003 Tool

Reserved Script Verb SET

Syntax and Example SET SET $server$ server_1 ADDHEADER host: $server$

Description Creates a variable that can be used throughout the script.

ADDVROOT

ADDVROOT ADDVROOT root6

Adds a Vroot name so that when any request is sent to the server, the Vroot is pre-pended to the server request. Removes the Vroot name so that it is not pre-pended to the server request. Used with PARSEXML to grab more than one XML tag from a response. The first four SET commands get the dav:!href property from the first four responses to the PROPFIND. The second four SET commands get the dav:!displayname property from the first four responses to the PROPFIND.

DELVROOT

DELVROOT DELVROOT root6

KEEPRESPONSE

PROPFIND /exchange/user1/Inbox c:\temp.xml keepresponse PARSEXML dav:!href SET $name1$ $xml$.NEXT SET $name2$ $xml$.NEXT SET $name3$ $xml$.NEXT SET $name4$ $xml$.NEXT PARSEXML dav:!displayname SET $displayname1$ $xml$.NEXT SET $displayname2$ $xml$.NEXT SET $displayname3$ $xml$.NEXT SET $displayname4$ $xml$.NEXT

RESPHEADER

RESPHEADER() SET $respvalue$ RESPHEADER(ETag) GET /exchange/user1/text.txt ADDHEADER IF-NONE-MATCH: $respvalue$ GET /exchange/user1/text.txt

Used to get header information returned in the response from the server.

Exchange Server Stress and Performance 2003 Tool 21

Reserved Script Verb New XMLList PARSEXML .NEXT

Syntax and Example SET $xml$ new XMLList PROPFIND /exchange/user1/Inbox c:\temp.xml PARSEXML dav:!href SET $name1$ $xml$.NEXT

Description These three constructs are used for taking variables from an XML response from a DAV request. The first command, setting the $xml$ variable, needs to be entered only once at the beginning of the script. The PROPFIND command gets properties on the Inbox described by the temp.xml file. The PARSEXML part of this command specifies which part of the returned XML to take. The third line sets the part of the XML that was grabbed to a variable name.

RESPXML

RESPXML() SET $xml$ RESPXML(opaquelocktoken)

This is used to parse the server's XML body response.

LOCK /exchange/user1/text.txt c:\.txt Note Use this only to extract the lock ADDHEADER Lock-Token: token out of the XML body that is returned from the server in a GET /exchange/user1/text.txt response to a lock command. If UNLOCK /exchange/user1/text.txt you use it for other than locks, the result is undefined. DELHEADER Lock-Token:

22 Exchange Server Stress and Performance 2003 Tool

Reserved Script Verb PARSEXML

Syntax and Example Example: SET $xml$ = new XMLList PROPFIND / PARSEXML dav:! displayname SET $prop$ $xml$.NEXT SET $nextprop$ $xml$.RND SET $fifthprop$ $xml$.5 SET $xml$.RESET SET $xml$.REMOVE GET //$prop$ DELXMLLIST $xml$ Methods supported by the XMLList object: .Next gets the next item .RND - gets a random item

Description PARSEXML enables you to store property values returned from the server as variables. You do this by adding the following text to the end of the command: PARSEXML Namespace! propertyname. The example to the left is doing a PARSEXML for namespace dav:! property displayname. Note that the PARSEXML option can be specified for any request (PROPFIND, SEARCH, ) but will work correctly only on requests that return XML (response body with a contenttype of text/xml). The results of doing a PARSEXML are stored in the last variable that you set as the XMLList.

.RESET- sets the next item back to the You can have and use multiple beginning of the list. This occurs automatically if XMLLists in your script, but the the end of the list is reached. results of the PARSEXML will .REMOVE removes all of the items in the list always be stored in the last one on .# - (where # is an integer) gets the item at index which SET was called. After you create an XMLList object, that # object is never deleted as long as the module exists, so you should reuse the objects as much as possible to keep the working set of the module low. DELXMLLIST SET $xml$ = new XMLList DELXMLLIST $xml$ Frees the memory associated with an XMLList object. However, note that you cannot use an XMLList that has been deleted unless you re-create it again with SET new XMLList. URIESCAPES the value of a given variable. This ensures that the variable is safe to use in a URI. URIUNESCAPES the value of a given variable. This removes any escaping.

URIESCAPE

URIESCAPE $variable$

URIUNESCAPE

URIUNESCAPE $variable$

Exchange Server Stress and Performance 2003 Tool 23

Reserved Script Verb CURRENT DATETIME ADDTIME

Syntax and Example SET $timenow$ = current datetime SET $time+1hr$ $timenow$ ADDTIME $time+1hr$ 60

Description These commands get the current date and time and put them into the format that DAV commands will use. They also create new date-time strings. Time added in the ADDTIME command is in minutes. The minutes can also be negative, which creates a past date.

SEARCHVAR

GET /exchange/user1/Calendar/?Cmd=new KEEPRESPONSE SEARCHVAR $mbxguid$ g_szMailboxGuid

Used to get data returned in a script. To simulate some actions in a script, you may need to get the mbxguid for a user. The mbxguid appears within a script as the response of a GET on the Calendar in a variable g_szMailboxGuid. To grab the variable, use the SEARCHVAR command.

REPLACEVARS

PROPPATCH / c:\text.txt replacevars

REPLACEVARS will open up the file specified and replace any instances of variable names with the corresponding values. Any variable that you can reference from a script as $variable$ will be replaced if that same string $variable$ exists in the file. The actual contents of the file on disk are not changed. Used to keep any variables that have been set in the script when including an external file.

SET REM ECHO

SET $$ UIDCOPY SAME < dest mailboxname> UIDCOPY NEXT < dest mailboxname>

44 Exchange Server Stress and Performance 2003 Tool

Example Scripts

Exchange Server Stress and Performance 2003 Tool 45

Table 21 Example IMAP4 module scripts Test Case CONNECT AUTHENTICATE SEQULIST(userlist.txt) SELECT "INBOX" FETCH ALL RFC822 LOGOUT SLEEP 60000 CONNECT AUTHENTICATE myuser1 myuserspassword APPEND "INBOX" c:\myfiles\testfile1.txt CLOSE LOGOUT CONNECT AUTHENTICATE mydomain\user1 password1 SELECT INBOX STORE ALL +flags \deleted EXPUNGE LOGOUT CONNECT AUTHENTICATE RANDLIST(userlist.txt) LOOP 10 SELECT SEQULIST(folderlist.txt) FETCH ALL body[header.fields (subject)] STORE ALL +flags \seen CLOSE ENDLOOP LOGOUT This will walk a folderlist.txt file, fetch all the subjects of each message, and mark each message as read. This deletes all the messages in the user's Inbox. This script appends a message to a user's Inbox. Description This script connects to a user's Inbox, reads all the messages in the Inbox, and logs out.

Simulating an Exchange Server 2003 UserStep 1: Create and Populate the UsersYou can populate a mailbox in many ways. The method described here uses an IMAP4 module and an IMAP4 ESP script that will populate a mailbox using the APPEND command. For example:CONNECT CAPABILITY

46 Exchange Server Stress and Performance 2003 Tool AUTHENTICATE SEQULIST(userlist.txt) LOOP 10 APPEND "INBOX" MyDataFile.eml ENDLOOP LOGOUT REM # Sleep for one day SLEEP 86400000

The SEQULIST (userlist.txt) command walks through the userlist.txt file that you created earlier. Each "User Instance" of the script represents a different entry in the list. Therefore, if you have 100 mailboxes that you want to populate, you should have 100 entries in your userlist.txt file and 100 User Instances when you start the ESP script. The APPEND "INBOX" MyDataFile.eml appends the contents of MyDataFile.eml to the user's inbox (local path relative to the location of the ESP Script), and the LOOP 10 ENDLOOP combination will run through the APPEND command 10 times. The APPEND command will generate messages in a way that is similar to local SMTP delivery. If you want to test your enterprise using predominantly MAPI clients (Outlook), consider a tool such as LoadSim, for generating mailbox content. The SLEEP command is used to prevent the script from running again. (Without the SLEEP command, ESP will automatically start a script from the beginning after it has finished running.) A variation on this is to use a SEQULIST or RANDLIST option for the list of files, such as:LOOP 10 APPEND "INBOX" SEQULIST(imap4messages.txt) APPEND "INBOX" SEQULIST(imap4messages.txt) ENDLOOP

Where imap4message.txt is a text file that contains a single message file name on each line. When ESP runs this block, it replaces the listing in the imap4messages.txt file at runtime and appends that file to the Inbox. In this way, you can maintain one file that represents your message set, in case you want to add/remove messages in the future. Also, if you use RANDLIST instead of SEQULIST, you can obtain random message coverage. TipTo avoid confusion when you try to locate files from scripts, put all files (Workspace.ini files, ESP scripts, associated list files, and message data files) in a local directory while you work. If you want to use relative paths, they must be relative to the script file.

Step 2: Customize the ScriptWhen customizing the IMAP4 scripts, you generally focus on number and frequency of client connections. The number of client connections is controlled with the User Instances property of the ESP module, and the frequency is controlled with the ending SLEEP statement in the scripts. Modify these two values to accommodate your test scenario. Two common methods can be used to iterate through userlist.txt files. The first method is a SEQULIST macro, and the second is a RANDLIST macro. SEQULIST maintains a correct state of mailbox connections throughout the test (because, unlike RANDLIST, you ensure only one client connection to any one mailbox). RANDLIST simulates more "real world" scenarios and provides additional benefit if your mailboxes are populated with messages of varying sizes and types.

Exchange Server Stress and Performance 2003 Tool 47

Simple Script ExampleYou can use the following simple script to simulate client load on an Exchange server. This script will walk through the userlist.txt file and read all of the messages in the user's Inbox.CONNECT CAPABILITY AUTHENTICATE SEQULIST(userlist.txt) SELECT "INBOX" FETCH ALL RFC822 LOGOUT SLEEP 60000

Advanced Script ExampleThe following script, (while quite involved), can be used to simulate a user reading 10 messages and then performing operations on those 10 messages (such as moving them to subfolders, setting properties, and deleting).REM # This script assumes the presence of at least 10 message currently in the users INBOX. REM # This script will leave the INBOX with the first 10 messages of the INBOX remaining... all others will be purged. CONNECT CAPABILITY AUTHENTICATE RANDLIST(userlist.txt) CREATE "BackMeUp" SELECT "INBOX" COPY 1:10 "BackMeUp" CREATE "Other Mail" CREATE "Trash" LIST "" "*" SELECT "INBOX" FETCHUID UIDFETCH 1:10 (FLAGS) UIDFETCH UIDALL (UID RFC822.SIZE rfc822.header) NOOP UIDFETCH FIRST 1 (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDCOPY 1 "Trash" UIDSTORE 1 +FLAGS (\Deleted) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDCOPY 2 "Other Mail" UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDFETCH NEXT (UID RFC822.SIZE RFC822)

48 Exchange Server Stress and Performance 2003 Tool SLEEP RANDNUMBER(100,120) UIDCOPY 1 "Trash" UIDSTORE 1 +FLAGS (\Deleted) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDCOPY 2 "Other Mail" UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(100,120) UIDCOPY 1 "Trash" UIDSTORE 1 +FLAGS (\Deleted) CHECK SLEEP RANDNUMBER(1000,2000) NOOP FETCH LAST 1 (UID) UIDCOPY LAST 2 "Other Mail" UIDSTORE LAST 2 +FLAGS (\Deleted) CLOSE SELECT "Other Mail" FETCHUID UIDFETCH 1:* (FLAGS) UIDFETCH UIDALL (UID RFC822.SIZE rfc822.header) NOOP UIDFETCH FIRST 1 (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(1000,2000) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(1000,2000) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(1000,2000) UIDFETCH NEXT (UID RFC822.SIZE RFC822) SLEEP RANDNUMBER(1000,2000) FETCHUID UIDCOPY LAST 4 "Trash" UIDSTORE LAST 4 +FLAGS (\Deleted) SLEEP RANDNUMBER(1000,2000) CLOSE SELECT "INBOX" FETCHUID UIDFETCH 1:10 (FLAGS) UIDFETCH UIDALL (UID RFC822.SIZE rfc822.header) NOOP SLEEP RANDNUMBER(1000,2000) UIDCOPY LAST 5 "Trash" UIDSTORE LAST 5 +FLAGS (\Deleted) EXPUNGE CLOSE SELECT "TRASH"

Exchange Server Stress and Performance 2003 Tool 49 STORE ALL +FLAGS (\DELETED) EXPUNGE LIST "TRASH" "*" DELETE "Other Mail" DELETE "TRASH" CLOSE SELECT "BackMeUp" COPY 1:10 "INBOX" DELETE "BackMeUp" LOGOUT

Step 3: RunSelect all the counters under the MSExchangeIMAP4 that pertain to your script. Some helpful counters are: Connections Current Connections Total CAPABILITY Total LOGOUT Total (Compare this to Connections Total and Capability Total to ensure that all of the users are completing the scripts.) UID or FETCH Rate (Several factors affect this such as server load, message size, and the type of item requested.) NoteAny UID commands display under the UID counters. For example, a UIDFETCH in the script appears under the UID Perfmon counters, not under the FETCH counters.

Using Protocol Logging on the ServerThe protocol logging registry key can help diagnose problems. Protocol logging can be helpful because a separate log is always created for each open connection. This is in contrast to the ESP log, which logs all connections into one file. For more information about protocol logging, see Microsoft Knowledge Base article 299778, "XGEN: How to Activate Protocol Logging for POP3 and IMAP4" (http://go.microsoft.com/fwlink/?linkid=3052&kbid=299778). TipLogging Level 4 is often the most useful, because it logs all interaction between the client and the server but truncates actual message data.

Step 4: Analyze the ResultsA good stress run will yield the following results, which you can observe through Perfmon: IMAP4 connections can be created throughout the test (\Connections Current is typically the same value throughout the test). Number of IMAP4 verbs should be directly proportional to the number of total connections. (For example, if your script has one close statement in it, then \Connections Total and \CLOSE Total should be equal.) No errors should be reported, unless your script is specifically testing error conditions. Always check event logs for important messages.

50 Exchange Server Stress and Performance 2003 Tool

LDAP Module for ESPThis module simulates multiple clients using the LDAP protocol. The module supports parameters for configuring different protocol-specific options, options for how the test executes, and security options. Examples are the server that this client is targeting, the port number, and the LDAP version. A script that contains ESP keywords and LDAP script commands specifies the client actions. This module also reports a number of statistics during runtime. Statistics give counts of the number of modules or protocol-specific events (for example, errors, successful or failed connection attempts, and so on) that occur during a test run. You can also log client actions and server responses during a test run. You cannot configure the events that are logged. The following section describes the commands that are specific to the LDAP test module and the parameters the module requires.

ParametersTable 22 lists the run-time parameters shown in the ESP UI and an explanation of each. Table 22 OLEDB module run-time parameters Parameter Script name Encryption method Description The name of the LDAP script to process Currently unsupported (Change Port Number to 636 or 3269 to use SSL, although this is currently untested.) Method used by the server to authenticate client sessions. The server may not support these methods, however. Optional/ Required Required Required NONE Default Legal Values

Authentication method

Required

NTLM

SIMPLE DPA NTLM NEGOTIATE MSN SICILY

Server Name Client Timeout

The server to connect to Duration (in milliseconds) before abandoning a pending LDAP operation (0=never abandon). This is independent of LDAP Time Limit (see below). LDAP version (2 or 3)

Required Required 120000

0-n

LDAP Version

Required

3

2 3

Exchange Server Stress and Performance 2003 Tool 51

Parameter LDAP Deref

Description

Optional/ Required

Default 0

Legal Values 0 1 2 3

LDAP connection Required ld_deref value (0=Never, 1=Searching, 2=Finding, 3=Always) LDAP referrals value (0 = off, 1=on, 32=chase subordinate referrals, 64=chase external referrals) LDAP connection ld_timelimit value (0=no limit) LDAP connection ld_sizelimit value (0=no limit) Port number for LDAP to use (389, 636, 3268, 3269) Required

LDAP Referrals

0

0 1 32 64

LDAP Time Limit

Required

60000

0-n

LDAP Size Limit

Required

0

0-n

LDAP Port Number

Required

389

389 636 3268 3269

Start time delay (ms)

Delay (in milliseconds) between starting virtual users Number of connections/virtual users to use

Required

200

0-n

User Instances

Required

1

1-n

StatisticsThe following are the run-time statistics that are reported to the ESP UI and an explanation of each (Table 23). Table 23 LDAP run-time statistics Statistic Connections Connect Commands Bind Commands Search Commands Modify Commands Add Commands Description Number of current LDAP connections Number of ldap_open calls Number of ldap_bind calls Number of ldap_search_ext calls Number of ldap_modify_ext calls Number of ldap_add_ext calls

52 Exchange Server Stress and Performance 2003 Tool

Statistic Delete Commands Compare Commands Rename Commands Quit Commands Errors

Description Number of ldap_delete_ext calls Number of ldap_compare_ext calls Number of ldap_rename_ext calls Number of ldap_unbind calls Number of errors

Script Verbs Specific to This Test ModuleThe following are the reserved word script verbs that are specific to this test module and a description of each (Table 24). Anything specified with the delimiters "" is required. Anything specified with the delimiters "[]" is optional. Table 24 OLEDB module reserved work scripts Reserved Script Verb CONNECT Syntax and Example CONNECT Description Connects to the server (via ldap_open API) the name of which is specified in the "Server name" parameter of the LDAP test module via the port specified in the "LDAP Port Number" parameter of the LDAP test module. The "LDAP Deref," "LDAP Options," "LDAP Time Limit," "LDAP Size Limit," and "LDAP Version" parameters of the LDAP test module are set on this connection if it is successful, and errors are emitted to the log if any of them fail to succeed (usually due to an invalid parameter value). BINDSIMPLE BINDSIMPLE [user name={name};] [password={passwd};] [domain={domain};]" BINDSIMPLE ANONYMOUS Performs an LDAP ldap_bind (not ldap_simple_bind despite the name) to the {dn} or "" if ANONYMOUS. Credentials are constructed based on the user name, password, and domain specified. If any of these are omitted, empty strings are substituted.

Exchange Server Stress and Performance 2003 Tool 53

Reserved Script Verb

Syntax and Example

Description Authentication is done based on the "Authentication method" parameter of the LDAP test module.

SEARCH

SEARCH RETURN DN=; FILTER=;

Searches the directory (via ldap_search) for the records matching the , starting from base DN={dn} with scope equal to SUBTREE, ONELEVEL, or BASE, returning all of the attributes (ALL), a hard-coded subset (sn, givenName), or a specified subset (commaseparated list of attributes with no spaces). Refer to RFCs 1960/2254 (A String Representation of LDAP Search Filters) and the examples for the format of a filter, although this implementation requires at least one level of parenthesis. For example, use FILTER=(objectClass=*);, not FILTER=objectClass=*;.

MODIFY

MODIFY DN={dn}; {attrib1}={value11||value12|| :R|A|D} [&& {attrib2}={value21||value22||:R|A| D} [&& ]]

Calls the LDAP API ldap_modify to modify the record DN={dn} with the attributes and values specified (&& separates the attributes.) Appended to each value can be a :R, a :A, or a :D to specify replace, add, or delete. If this is omitted, it will default to add. A value can be a string (trailing white space is ignored, leading white space is not), a HEX: sequence (for example, attrib=HEX:80000000), or a FILE containing the data (for example, attrib=FILE:c:\ldapdata.txt).

ADD

ADD DN={dn}; {attrib1}={value11||value12||:R|A| D} [&& {attrib2}={value21||value22||:R|A|D} [&& ]]

Calls the LDAP API ldap_add to add the record DN={dn} with the attributes and values

54 Exchange Server Stress and Performance 2003 Tool

Reserved Script Verb

Syntax and Example

Description specified. Appended to each value can be a :R, a :A, or a :D to specify replace, add, or delete (although these can be specified, if they are not "add," the behavior is undefined). If this is omitted, it will be set to add. A value can be a string (trailing white space is ignored; leading white space is not), a HEX: sequence (for example, attrib=HEX:80000000), or a FILE containing the data (for example, attrib=FILE:c:\ldapdata.txt).

DELETE

DELETE DN={dn};

Calls the LDAP API ldap_delete to delete the record {dn} from the directory. Calls the LDAP API ldap_compare, which compares the attribute {attrib} on the {dn}. It returns true if the values are the same. Calls the LDAP API ldap_rename, which moves/renames {olddn} to {rdn},{parent}. The final Boolean specifies whether to delete the attributes on the existing distinguished name while renaming it.

COMPARE

COMPARE DN={dnsrc}; {attrib}={value}

RENAME

RENAME DN={olddn}; DN={rdn}; DN={parent}; {TRUE|FALSE}"

IF

IF DN={dn}; FILTER={filter}; COMMAND

Calls the LDAP API ldap_search_s with scope=LDAP_SCOPE_BASE , baseDN={dn}, and filter={filter}. If the search returns the distinguished name (in other words, the filter evaluates to TRUE), proceed with the LDAP script COMMAND, otherwise do nothing.

Exchange Server Stress and Performance 2003 Tool 55

Reserved Script Verb QUIT

Syntax and Example QUIT

Description Closes the LDAP connection by issuing an LDAP API ldap_unbind call.

Commands Specific to This Test ModuleThe following are the LDAP APIs (as specified in MSDN) invoked as a result of the various SCRIPT module verbs. Ldap_open and ldap_bind_s are synchronous API calls. The rest are asynchronous, although the module waits for the response (through ldap_result) before proceeding to the next script verb. m_pLdapClient = ldap_open(m_pszServer, m_dwPort); Invoked by the script command CONNECT, where m_pszServer is the pointer to the Server name parameter, and m_dwPort is the Port number parameter. ldap_bind_s(m_pLdapClient, szDN, m_ulLdapMethod == LDAP_AUTH_SIMPLE ? (PCHAR)szPasswd : (PCHAR)&AuthIdentity, m_ulLdapMethod); Invoked by the script command BINDSIMPLE, where m_pLdapClient is the LDAP connection pointer from ldap_open; szDN is a pointer to a string that contains the base distinguished name;AuthIdentity is a SEC_WINNT_AUTH_IDENTITY structure constructed from the user name, domain, and password; szPassword is a pointer to the string that contains the password; and m_ulLdapMethod is the Authentication Method parameter. ldap_search_ext(m_pLdapClient, szDNBase, ulScope, szFilter, rgszAttribList, FALSE, NULL, NULL, m_ld_timelimit, m_ld_sizelimit, &m_msgid); Invoked by the script command SEARCH, where m_pLdapClient is the LDAP connection pointer from ldap_open; szDNBase is a pointer to a string containing the base distinguished name of the search; ulScope is the scope specified (LDAP_SCOPE_BASE, LDAP_SCOPE_ONELEVE,L or LDAP_SCOPE_SUBTREE); szFilter is the pointer to the filter string; rgszAttribList is a NULL terminated array of string pointers enumerating the attributes to return; and m_ld_timelimit and m_ld_sizelimit are the Time Limit and Size Limit parameters. ldap_modify_ext(m_pLdapClient, szDN, ppMods, NULL, NULL, &m_msgid); Invoked by the script command MODIFY, where m_pLdapClient is the LDAP connection pointer from ldap_open; szDN is a pointer to the string that contains the distinguished name to modify; and ppMods is a pointer to an LDAPMod structure (containing data about the modification to perform). ldap_add_ext(m_pLdapClient, szDN, ppMods, NULL, NULL, &m_msgid); Invoked by the script command ADD, where m_pLdapClient is the LDAP connection pointer from ldap_open; szDN is a pointer to the string that contains the distinguished name to add; and ppMods is a pointer to an LDAPMod structure (which contains data about the attributes to add). ldap_rename_ext( m_pLdapClient, szOldDN, szNewRDN, szNewParent, (int)fDelete, NULL, NULL, &m_msgid); Invoked by the script command RENAME, where m_pLdapClient is the LDAP connection pointer from ldap_open; szOldDN is a pointer to the string containing the original distinguished name; szNewRDN a pointer to the string that contains the new RDN; szNewParent a pointer to the string that contains the new parent; fDelete equal to 1 or 0 depending on whether deleting the attributes is specified. ldap_compare_ext(m_pLdapClient, szDN, szAttrib, szValue, NULL, NULL, NULL, &m_msgid);

56 Exchange Server Stress and Performance 2003 Tool

Invoked by the script command COMPARE, where m_pLdapClient is the LDAP connection pointer from ldap_open; szDN is a pointer to the string that contains the distinguished name; szAttrib a pointer to the string that contains the attribute name; szValue a pointer to the string that contains the attribute value. ldap_delete_ext(m_pLdapClient, szDN, NULL, NULL, &m_msgid); Invoked by the script command DELETE, where m_pLdapClient is the LDAP connection pointer from ldap_open, and szDN is a pointer to the string that contains the distinguished name to be deleted. ldap_unbind(m_pLdapClient); Invoked by the script command QUIT, where m_pLdapClient is the LDAP connection pointer from ldap_open.

Exchange Server Stress and Performance 2003 Tool 57

Example ScriptTable 25 LDAP module example script Test Case CONNECT BINDSIMPLE ANONYMOUS LOOP 1000 SEARCH SUBTREE RETURN cn,mailNickName,objectGuid DN=dc=server,dc=com; FILTER=(&(displayName=userRANDNUMBER(1,1000))(objectClass=user)); SLEEP 100 ENDLOOP QUIT CONNECT BINDSIMPLE dn=cn=administrator,cn=users,dc=server,dc=com; user name=administrator; password=; domain=mydomain; MODIFY DN=CN=user1,CN=Users,dc=server,dc=com; sn=RANDALPHA(10):R && phone=555-1212:R QUIT CONNECT BINDSIMPLE dn=cn=administrator,cn=users,dc=server,dc=com; user name=administrator; password=; domain=mydomain; LOOP 100 IF DN=CN=userSEQUNUMBER(1,100,1),CN=Users,dc=server,dc=com; FILTER=(objectClass=contact); MODIFY DN=CN=userSAMESEQUNUMBER(1,100,1),CN=Users,dc=server,dc=com; sn=RANDALPHA(10):R && phone=555-1212:R QUIT Conditionally modifies a set of distinguished names. Modifies a user's data. Description Conducts 1000 searches for users against a directory service.

OLEDB Module for ESPThis module simulates multiple clients using the OLEDB COM interfaces. The module supports parameters for configuring OLEDB-specific options and options for how the test runs. An example is the server this client is targeting. Client actions are simulated by running a script that contains ESP keywords and OLEDB-specific verbs. Some simple environment variables and flow-control constructs are also supported. This module reports a number of statistics during runtime. Statistics give counts of the number of modules or protocol-specific events (for example, errors) that occur during a test run. You can also log client actions and server responses during a test run. You cannot configure the events that are logged.

58 Exchange Server Stress and Performance 2003 Tool

Run-time ParametersThe following are the run-time parameters shown in ESP UI and an explanation of each (Table 26). Table 26 OLEDB module run-time parameters Parameter Script File Server Start Time Delay (ms) Description Script file to run a test Server name Duration (in milliseconds) that each script instance will be delayed from starting Optional/ Required Required Required Required, > than 0 Default Blank Blank 0 Legal Values 1-n

Script Verbs Specific to This Test ModuleThe following are the reserved word script verbs that are specific to this test module and a description of each (Table 27). Anything specified with the delimiters "" is required. Anything specified with the delimiters "[]" is optional. Table 27 OLEDB module reserved work scripts Reserved Script Syntax and Example Verb COPYOBJ COPYOBJ {Source URL} {Resource} {Destination URL} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 COPYOBJ %PrivateURL%/Inbox/ SrcFooMsg %PrivateURL %/Inbox/DestFoomsg CREATECOLLE CTION CREATECOLLECTION {URL/FolderObjectName} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 CREATECOLLECTION %PrivateURL%/Inbox/FooFolder1 CREATERESOU RCE CREATERESOURCE {URL/ResourceName} {optional file to stream in} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 CREATERESOURCE %PrivateURL%/FooMessage1 CREATERESOURCE %PrivateURL%/FooMessage2 MessageBody.Txt Creates a resource object in the store. Description Copies trees or subtrees of rows designated by a source URL to a location specified by a destination URL. Creates a folder object in the store.

Exchange Server Stress and Performance 2003 Tool 59

Reserved Script Syntax and Example Verb DELETEOBJ DELETEOBJ {Source URL} {Resource} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 DELETEOBJ %PrivateURL%/Inbox/ FooMessage1 DELETEOBJ %PrivateURL%/Inbox/ FooFolder1 DELETEPROP DELETEPROP {URL} {Property Name} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 DELETEPROP %PrivateURL%/Inbox/FooMessage2 mapi:0x0037001f GETMESSAGE GETMESSAGE {URL/Message} {Optional Output File} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 GETMESSAGE %PrivateURL%/Inbox/FooMessage2 GETMESSAGE %PrivateURL%/Inbox/FooMessage2 C:\TEMP\MsgOutput.Txt GETPROP GETPROP {URL} {Property Name} {Property Type} {Output file} SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 GETPROP %PrivateURL%/Inbox/FooMessage3 mapi:0x0037001f STRING GETPROP %PrivateURL%/Inbox/FooMessage3 mapi:0x00170003 INT GETPROP %PrivateURL%/Inbox/FooMessage3 DAV:displayname STRING D:\Property1.Txt MSGBOX $$The name of the message is %PROPVALUE%$$ GETPROP %PrivateURL%/Inbox/FooMessage3 DAV:getcontentlength INT D:\Property2.Txt MSGBOX $$The size of the message is %PROPVALUE%$$ Note Property Type can be [STRING | INT | BINARY] Properties that are INT and STRING types are stored in the system variable PROPVALUE. Each call to GETPROP replaces the last value stored in the variable "PROPVALUE"

Description Deletes the trees or sub-trees specified by the source URL.

Deletes a property from a row.

Binds to a specified resource and retrieves the resource from a stream object.

Reads a property from a row.

60 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb GETPROVIDER GETPROVIDER {BINDER | DATASOURCE | DSOBIND} {ProgID} {Binding URL} REM *** Set a variable for the user name SETVAR User Name = User1 REM *** Create a session via a binder object GETPROVIDER BINDER EXOLEDB.BINDER File://./BackOfficeStorage/%USERDNSDOMAIN %/MBX/%User Name% REM *** Create a session by creating a datasource object GETPROVIDER DATASOURCE EXOLEDB.DATASOURCE File://./BackOfficeStorage/%USERDNSDOMAIN%/Public Folders REM *** GOTO GOTO {label} SETVAR Case = 1 IF %Case% = 3 Then GOTO CASE3 IF %Case% = 2 Then GOTO CASE2 IF %Case% = 1 Then GOTO CASE1 GOTO END :CASE3 MSGBOX $$Running Test Case 3$$ GOTO END :CASE2 MSGBOX $$Running Test Case 2$$ GOTO END :CASE1 MSGBOX $$Running Test Case 1$$ GOTO END :END MSGBOX $$End of Test Suite$$ STOP Note When executing a GOTO script command, you must use a label somewhere in the script, otherwise an error will occur. A label is designated by a leading colon and then the name of the label (see example above).

Description Starts and initializes the Exchange OLEDB provider via a Binder or Datasource.

Forces script code to branch unconditionally to another part of the script.

Exchange Server Stress and Performance 2003 Tool 61

Reserved Script Syntax and Example Verb IF...THEN IF {expression} {= | < | > | != } {expression} THEN {Command} IF 123 = 123 THEN MSGBOX $$This expression is true$$ IF 123 = 456 THEN MSGBOX $$This expression is not true$$ SETVAR X = 1 IF %X% = 1 THEN MSGBOX $$This expression is true$$ SETVAR Y = 1 IF %X% = %Y% THEN MSGBOX $$The expression %X% equals %Y% is a true statement$$ IF %X% > %Y% THEN MSGBOX $$This statement won't get executed$$ IF %X% < %Y% THEN CREATERESOURCE Exstore://LocalHost/Private/User/Inbox/SomeMsg%Y% IF %X% != %Y% THEN CREATECOLLECTION Exstore://LocalHost/Private/User/Inbox/FooFolder%X% ITERATE ITERATE {number of iterations} SAVEROWSET ON SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 SELECT $$SELECT "DAV:displayname" FROM SCOPE('SHALLOW TRAVERSAL OF "%PrivateURL %/INBOX/"')$$ ITERATE 100 Note SAVEROWSET must be turned on before using this feature. LAUNCHPROCE LAUNCHPROCESS {Filename} {Argument 1, Argument 2, ...} SS {NOWAIT | WAIT}

Description Enables conditional processing to be performed in the OLEDB ESP script.

Iterates through a rowset a specified number of times after issuing a SELECT statement.

Starts a specified execute command and optionally waits for the program to REM *** Launch Notepad.Exe and wait for the program to finish finish running running before continuing to run commands in Medusa before proceeding. LAUNCHPROCESS NOTEPAD.EXE D:\Medusa_Log.Txt WAIT REM *** Launch Notepad.Exe and do not wait for the program to finish running before continuing to run commands in Medusa LAUNCHPROCESS NOTEPAD.EXE D:\Medusa_Log.Txt NOWAIT

62 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb LOGLEVEL LOGLEVEL {ERRORS | ALL} LOGLEVEL ERRORS LOGLEVEL ALL MOVEOBJ MOVEOBJ {Source URL} {Resource} {Destination URL} REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 MOVEOBJ %PrivateURL%/Inbox/ SrcFooMessage1 %PrivateURL%/Inbox/DestFooMessage1 MSGBOX MSGBOX {Message Text} {Optional caption for dialog box} MSGBOX $$This is some text to be displayed$$ $$Exchange Rocks$$ SETVAR FooVar = Hello World! MSGBOX $$%FooVar%$$ SETVAR X = Hi MSGBOX %X% Note Any text that includes spaces must be enclosed in "$$." This also includes variables in which the value contains spaces. SAVEROWSET SAVEROWSET { ON | OFF} SAVEROWSET ON SELECT $$SELECT "DAV:displayname" FROM SCOPE('SHALLOW TRAVERSAL OF "%PrivateURL %/INBOX/"')$$ ITERATE 100 Note Used in conjunction with ITERATE.

Description Logs all commands and the status of the commands to the log file (regardless of error). Moves the trees or sub-trees specified by the source URL to a location specified by a destination URL.

Temporarily suspends the ESP test script and displays a dialog box with the specified text.

Turns ON or OFF the persistence of an IRowset object.

Exchange Server Stress and Performance 2003 Tool 63

Reserved Script Syntax and Example Verb SELECT SELECT {SQL Select} {Optional output file | NULL} REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 SELECT $$SELECT mapi:0x0037001f FROM SCOPE('SHALLOW TRAVERSAL OF "%PrivateURL %/Inbox/"')$$ Note SQL command must be surrounded by $$. If NULL is specified as the argument for the OUTPUT file, then the SELECT will only traverse the entire rowset. This is different from not specifying an OUTPUT file, which the rowset NOT, not to be traversed before being released. This provides a way to determine how much time is spent creating the rowset and how much time is spent traversing it. SETBINDFLAGS SETBINDFLAGS { DBBINDURLFLAG_READ | DBBINDURLFLAG_WRITE | DBBINDURLFLAG_READWRITE | DBBINDURLFLAG_SHARE_DENY_READ | DBBINDURLFLAG_SHARE_DENY_WRITE | DBBINDURLFLAG_SHARE_EXCLUSIVE | DBBINDURLFLAG_SHARE_DENY_NONE | DBBINDURLFLAG_RECURSIVE | DBBINDURLFLAG_OUTPUT | DBBINDURLFLAG_ASYNC | DBBINDURLFLAG_COLLECTION | DBBINDURLFLAG_OPENIFEXISTS | DBBINDURLFLAG_OVERWRITE | DBBINDURLFLAG_ISSTRUCTUREDDOCUMENT | NULL } SETBINDFLAGS DBBINDURLFLAG_READ DBBINDURLFLAG_WRITE SETBINDFLAGS DBBINDURLFLAG_READWRITE DBBINDURLFLAG_OVERWRITE SETBINDFLAGS NULL Note NULL Sets the value of the flag to zero Default value: 0

Description Runs the specified SQL Select statement against the Exchange store.

Sets a system (OLEDB Module) variable used during all of the calls to IBindResource::Bin d for the DBBINDURLFLA G parameter.

64 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb SETCREATEFL AGS SETCREATEFLAGS { DBBINDURLFLAG_READ | DBBINDURLFLAG_WRITE | DBBINDURLFLAG_READWRITE | DBBINDURLFLAG_SHARE_DENY_READ | DBBINDURLFLAG_SHARE_DENY_WRITE | DBBINDURLFLAG_SHARE_EXCLUSIVE | DBBINDURLFLAG_SHARE_DENY_NONE | DBBINDURLFLAG_RECURSIVE | DBBINDURLFLAG_OUTPUT | DBBINDURLFLAG_ASYNC | DBBINDURLFLAG_COLLECTION | DBBINDURLFLAG_OPENIFEXISTS | DBBINDURLFLAG_OVERWRITE | DBBINDURLFLAG_ISSTRUCTUREDDOCUMENT | NULL } SETCREATEFLAGS DBBINDURLFLAG_READWRITE SETCREATEFLAGS DBBINDURLFLAG_READWRITE DBBINDURLFLAG_OPENIFEXISTS SETCREATEFLAGS NULL Note NULL Sets the value of the flag to zero Default value: 0.

Description Sets a system (OLEDB Module) variable used during all of the calls to ICreateRow::Create Row for the DBBINDURLFLA G parameter.

Exchange Server Stress and Performance 2003 Tool 65

Reserved Script Syntax and Example Verb SETSCOPEFLA GS SETSCOPEFLAGS {Scope Type } { DBMOVE_REPLACE_EXISTING | DBMOVE_DONT_UPDATE_LINKS | DBMOVE_ASYNC | DBMOVE_ALLOW_EMULATION | DBMOVE_ATOMIC | DBDELETE_ASYNC | DBDELETE_ATOMIC | DBCOPY_REPLACE_EXISTING | DBCOPY_ASYNC | DBCOPY_ALLOW_EMULATION | DBCOPY_NON_RECURSIVE | DBCOPY_ATOMIC | NULL } Scope Type can be MOVE, COPY, or DELETE SETSCOPEFLAGS MOVE DBMOVE_ALLOW_EMULATION SETSCOPEFLAGS DELETE DBDELETE_ATOMIC SETSCOPEFLAGS COPY DBCOPY_ASYNC DBCOPY_ATOMIC SETSCOPEFLAGS MOVE NULL SETSCOPEFLAGS MOVE DBMOVE_REPLACE_EXISTING DBCOPY_REPLACE_EXISTING Note NULL sets the value of the flag to zero. It is possible to set the COPY, MOVE and DELETE flags with ANY of the flags (DBDELETE_ASYNC & DBMOVE_REPLACE_EXISTING). Default values: MOVE = DBMOVE_REPLACE_EXISTING COPY = DBCOPY_REPLACE_EXISTING DELETE = 0

Description Sets a system (OLEDB Module) variable used during all of the calls to IScopedOperations:: [Copy | Move | Delete] for the dw[Copy | Move | Delete]Flags parameter.

66 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb SETPROP SETPROP {URL} {Property Name} {Property Type} {Memory Size in bytes} REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** The line below will set the subject (PR_SUBJECT = mapi:0x0037001f) SETPROP %PrivateURL%/Inbox/NewMessage mapi:0x0037001f STRING $$Hello World$$ REM *** The line below will set the body (PR_BODY = mapi:0x1000001e). It will then fill in the body of the message REM *** with as many iterations of "HelloWorld" as will fit into 1024 bytes. SETPROP %PrivateURL%/Inbox/NewMessage mapi:0x1000001e STRING HelloWord 1024 Notes Property Type can be [STRING | INT | BINARY] Memory Size (in bytes) is the amount of memory allocated each time a property is SET. When specifying the amount of memory for a STRING data type, it stores the characters as Unicode, which actually takes up two bytes. The "Memory Size" (in bytes) has no effect on an "INT" data type. SETMULTIPROP SETMULTIPROP {URL} {Property Count} {Property Name} {Property Type} REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** Set multiple properties for a resource in the store REM *** This particular call below will set the PR_IMPORTANCE, PR_PRIORITY, and DAV:displayname for the resource SETPROP %PrivateURL%/Inbox/NewMessage 3 mapi:0x170003 INT 0 mapi:0x360003 INT 0 DAV:displayname STRING $$This is a test$$

Description Sets the value of a specified column in a row.

Sets multiple properties for a specified column in a row.

Exchange Server Stress and Performance 2003 Tool 67

Reserved Script Syntax and Example Verb SETPENDINGTR SETPENDINGTRANS {ON | OFF} ANS REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** Do not start a new transaction until the next EXOLEDB script command SETPENDINGTRANS OFF REM *** This command will not start a transaction because it doesn't execute any EXOLEDB specific provider code SETCREATEFLAGS DBBINDURLFLAG_READWRITE REM *** The two commands below will behave by starting a transaction, creating the resource, REM *** and then commit the transaction CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE1 REM *** By default at this point a pending or retaining transaction would be in effect REM *** But since pending transactions are OFF, a transaction is not started until the point immediately before the resource is created CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE2 REM *** Let's turn back on Pending Transactions SETPENDINGTRANS ON Note By default, after each EXOLEDB script command is executed, everything is committed that was inside of the transaction. Immediately after committing the transaction, a new one is started. If the value for this command is set to OFF, a transaction is not started until the next EXOLEDB script command is executed. Default value: ON

Description Turns ON or OFF pending (or retaining transactions).

68 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb SETROWSTOFE TCH SETROWSTOFETCH {number of rows} SETVAR BASEURL=FILE://./BACKOFFICESTORAGE/ %USERDNSDOMAIN%/MBX/TESTUSER1 REM *** Initialize the provider SETBINDFLAGS DBBINDURLFLAG_READ GETPROVIDER DATASOURCE EXOLEDB.DATASOURCE %BASEURL% REM *** Set the number of rows to fetch when retrieving data SETROWSTOFETCH 10 REM *** Issue a query. As the data is retrieved 10 rows will be retrieved at a time REM *** If there are less than 10 rows to be retrieved, the remaining number will be retrieved SELECT $$SELECT "DAV:displayname","DAV:isfolder" FROM "%BASEURL%/Inbox"$$ E:\MEDUSA\SCRIPTS\SELECT1.TXT REM *** Stop the script STOP Note Once the number of rows is set via SETROWSTOFETCH, all subsequent calls to ::GetNextRows will use that value. To reset the number of rows fetched for each call to 1 (the default value), another call must be made to SETROWSTOFETCH with the value of 1 (for example, SETROWSTOFETCH 1). SETTRANS SETTRANS { ON | OFF } Note COPYOBJ and MOVEOBJ operations are never wrapped in a transaction. SETVAR SETVAR {User Variable Name | System Variable Name} = {Value | Expression} REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 SETVAR MessageNum = 1 SETVAR MessageNum = MessageNum + 1 SETVAR MessageNum = MessageNum * 5 SETVAR MessageNum = MessageNum 4 SETVAR MessageNum = MessageNum / 2 MSGBOX MessageNum = %MessageNum% CREATERESOURCE %PrivateURL%/Inbox/Message %MessageNum% CREATECOLLECTION %PrivateURL%/Inbox/Folder %MesssageNum%

Description Sets the number of rows that will be fetched on each call that is made to IRowset::GetNextR ows.

Turns wrapping commands in a transaction ON or OFF.

Sets a user-defined or system variable.

Exchange Server Stress and Performance 2003 Tool 69

Reserved Script Syntax and Example Verb SETVERSIONC MD SETVERSIONCMD { ALL | LATEST | VID } VersionCommand ALL VID LATEST Getting the latest version Getting the specified VID SETVERSIONCMD ALL File://./BackOfficeStorage/ %Userdnsdomain%/Public%20Folders/user/msg SETVERSIONCMD LATEST File://./BackOfficeStorage/ %Userdnsdomain%/Public%20Folders/user/msg DESTROY SETVERSIONCMD 09e8475a91e340012 File://./BackOfficeStorage/%Userdnsdomain%/Public %20Folders/user/msg PIN TRANSSTART TRANSSTART REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** Turn off automatic transactions SETTRANS OFF REM *** Start a new transaction TRANSSTART REM *** Wrap the next two commands in a transaction CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE1 CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE2 REM *** Because automatic transactions are off, you need to manually commit the transactions TRANSCOMMIT REM *** Turn back on automatic transactions SETTRANS ON Note Automatic transactions must be turned off to use this feature. URL

Description Sets Version CMD for an object to be manipulated.

Getting everything (Not getting versioned object)

Manually starts a transaction.

70 Exchange Server Stress and Performance 2003 Tool

Reserved Script Syntax and Example Verb TRANSCOMMIT TRANSCOMMIT REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** Turn off automatic transactions SETTRANS OFF REM *** Start a new transaction TRANSSTART REM *** Wrap the next two commands in a transaction CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE1 CREATERESOURCE %PrivateURL %/INBOX/TESTMESSAGE2 REM *** Because automatic transactions are off, you need to manually commit the transactions TRANSCOMMIT REM *** Turn back on automatic transactions SETTRANS ON Note Automatic transactions must be turned off to use this feature. TRANSABORT TRANSABORT REM *** Set a variable for the URL SETVAR PrivateURL=File://./BackofficeStorage/ %UserDNSDomain%/MBX/TestUser1 REM *** Turn off automatic transactions SETTRANS OFF REM *** Start a new transaction TRANSSTART REM *** Wrap the next two commands in a transaction CREATERESOURCE %PrivateURL%/TESTMESSAGE1 CREATERESOURCE %PrivateURL%/TESTMESSAGE2 REM *** Now, end the last transaction, thereby rolling back the creation of messages 'TestMessage1' & 'TestMessage2' TRANSABORT REM *** Turn on automatic transactions again SETTRANS ON Note Automatic transactions must be turned off to use this feature.

Description Manually commits an active transaction.

Manually stops an active transaction.

Commands Specific to This Test ModuleThis module supports some simple global variables that you can use in your scripts: SLEEPCOMMIT Causes the ESP OLEDB module to wait the specified number of milliseconds before committing the current transaction SETVAR SLEEPCOMMIT=5000 *** This will cause the module to wait 5 seconds before committing.

Exchange Server Stress and Performance 2003 Tool 71

SETVAR SLEEPCOMMIT=0 *** This will cause the module to not wait at all. SETVAR SLEEPCOMMIT=250 *** This will cause the module to wait 1/4 second before committing. PROBBUFFSIZE Sets the amount of memory allocated each time a property is set or got via SETPROP or GETPROP SETVAR PROBBUFFSIZE=1024 *** Allocates 1024 bytes for SETing/GETing properties SETVAR PROBBUFFSIZE=10000 *** Allocates 10000 bytes for SETing/GETing properties COMPUTERNAME System variable that contains the same value as the environment variable COMPUTERNAME USERDNSDOMAIN System variable that contains the same value as the environment variable USERDNSDOMAIN HRESULT System variable that contains the last HRESULT return value from an OLEDB API call PROPVALUE Contains the value of the last property retrieved via GETPROP

POP3 Module for ESPThis module simulates multiple clients using the POP3 protocol. The module supports parameters for configuring different protocol-specific options, options for how the test executes, and security options. Examples are the server that this client is targeting or the port number. Client actions are simulated by running a script that contains ESP keywords and POP3 verbs. This module also reports several statistics during runtime. Statistics give counts of the number of modules or protocol-specific events (for example, errors, successful or failed connection attempts, and so on) that occur during a test run. You can also log client actions and server responses during a test run. You cannot configure the events that are logged.

Run-time ParametersThe following are the run-time parameters shown in ESP UI and an explanation of each (Table 28). Table 28 POP3 module run-time parameters Parameter Enable Local Logging Description Enables/Disables creating a per-module log file Optional/ Required Optional Default NO Legal Values YES NO

Local Logfile Path

Script file containing test Required steps to be run Blank

Script Path

72 Exchange Server Stress and Performance 2003 Tool

Parameter Encryption Method

Description Enc