Monitoring Performance with PERFTEST

PERFTEST is used to monitor the performance of a gateway. Standard counters are available, or you can add your own counters by modifying the sample code.

If you want to add additional counters, you may want to modify the COUNTERDEF array in the source code. Refer to COUNTERDEF for more information about this structure because the counters must be added in the correct sequence.

The following procedures describe how to run PERFTEST as either a standalone application or as a service of Windows NT Server.

    To run PERFTEST as a standalone application
  1. At a command prompt, change to the \BKOFFICE\BIN directory.
  2. Verify that a gateway has been installed. See Installing the Sample Gateway. For a simple procedure for setting up and verifying a gateway, see Importing and Exporting with DIRSYNC.
  3. Set up the Windows NT Registry information for PERFTEST by typing the following command:

    PERFINST /SERVICE=<gateway-name> /CLASS=PerfTestType /DLL=C:\BKOFFICE\BIN\GWPERF.DLL /OPEN=OpenGatewayPerformanceData /COLLECT= CollectGatewayPerformanceData /CLOSE=CloseGatewayPerformanceData

    The following new registry key is created for PERFTEST: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfTestType\Performance and Linkage.

    The Library value in this new registry key is configured to search for GWPERF.DLL in the \BKOFFICE\BIN directory.

  4. Change to the BKOFFICE\SAMPLES\EXCHANGE\PERFTEST directory.
  5. Type LODCTR PRFCOUNT.INI. This step loads the counter information into the PERFTEST registry entry.
  6. Run PERFTEST by typing PERFTEST NOTSERV <gateway-name>

    An icon labeled Performance Monitoring Sample is displayed at this point. It indicates that PERFTEST is running as an application.

  7. Start the Windows NT Performance Monitor and add the counters to be monitored.
    To run PERFTEST as a service of Windows NT Server
  1. At a command prompt, change to the \BKOFFICE\BIN directory.
  2. Install a gateway if one is not installed. See Sample Gateway and Applications for more information. Do not use GWSETUP to install the gateway when you are using PERFTEST to monitor the gateway because GWSETUP creates objects and pointers that conflict with PERFTEST. If GWSETUP has been used to install the gateway, you should completely remove and reinstall the gateway prior to using PERFTEST. See Removing a Gateway and Installing the Sample Gateway.
  3. Set up the Windows NT Registry information for PERFTEST by typing the following command:

    PERFINST /SERVICE=<gateway-name> /CLASS=PerfTestType
    /DLL=c:\BKOFFICE\BIN\GWPERF.DLL
    /OPEN=OpenGatewayPerformanceData /COLLECT=CollectGatewayPerformanceData /CLOSE=CloseGatewayPerformanceData

    A new registry key is created for PERFTEST: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
    PerfTestType\Performance and Linkage.

  4. Change directory to \BKOFFICE\SAMPLES\EXCHANGE\PERFTEST
  5. Type LODCTR PRFCOUNT.INI.
  6. Now you can run PERFTEST by typing PERFTEST <gateway-name>.
  7. Start the Windows NT Performance Monitor and add the counters that you want to monitor.
  8. Select PERFTEST from the Object drop-down combo box.
  9. Select the counter you want to monitor for the gateway.
  10. Log on to a mailbox with the Microsoft Exchange Client.
  11. Submit a message to a custom recipient associated with the gateway that you are monitoring. The message will be returned to you and the counter on Windows NT Performance Monitor will reflect the message's effect on the gateway.