Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Monitor Performance at Run Time

How to: Monitor Performance at Run Time

The .NET Compact Framework Remote Performance Monitor is an analysis tool that is included with the .NET Compact Framework version 2.0 Service Pack 1. This tool provides a user interface that lets you view performance data on the fly. When you start your application from Remote Performance Monitor, the tool will read statistical data for the .NET Compact Framework performance counters directly from the common language runtime (CLR).

You can also view .NET Compact Framework performance data by using the Windows desktop tool, PerfMon.exe. You can use these tools together for a live, graphical view of the performance counter data generated by the CLR.

Remote Performance Monitor enables you to do the following:

  • View performance counter data while an application is running.

  • View performance counter data in a graphical format in PerfMon.exe while an application is running.

  • Enable the generation of .stat files to duplicate behavior supported in earlier versions of the .NET Compact Framework. When you use this feature, any .stat file is written to disk when the application exits. For more information, see How to: Generate Performance Statistics.

  • View previously generated .stat files that were created in the .NET Compact Framework version 2.0.

  • Enable and disable logging.

Remote Performance Monitor supports Windows CE 5.0, Windows Mobile 5.0, Pocket PC 2003, and Smartphone 2003 devices.

Remote Performance Monitor and its associated files are located in Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin. This directory contains both device-side and desktop-side files.

NoteNote

For the most current information about Remote Performance Monitor, see the readme file in Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin.

To set up Remote Performance Monitor by using ActiveSync

  • Copy Netcfrtl.dll to the \Windows directory on the device by using an ActiveSync connection.

    This file is located in Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin.

To set up Remote Performance Monitor by using an Ethernet connection

  1. Obtain the IP address and port number for the device.

    You can obtain this information by copying Netcflaunch.exe to your device and running it. When this application runs, it displays the IP address and port number that is currently being used. This file is located in Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin.

    You will use the IP address and port number when running an application from Remote Performance Monitor.

  2. Copy Netcfrtl.dll to the \Windows directory on the device.

To run an application from Remote Performance Monitor

  1. Start Remote Performance Monitor.

    This file is named NetCFrpm.exe and is located in Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin.

  2. On the File menu, click Live Counters.

  3. In the Device box, type or select the device.

    If you are using an ActiveSync connection, select the appropriate device from the list. If you are using an Ethernet connection, type the IP address and port number in the Device box. For example, type 128.128.0.1 6519 to use port 6519 on a device with an IP address of 128.128.0.1.

  4. Enter the full path to the application in the Application box.

  5. Enter any command-line arguments for the application in the Parameters box.

  6. Verify that the application is not running on the device.

  7. Click Connect.

    Remote Performance Monitor starts the application and displays performance data.

To use PerfMon.exe with Remote Performance Monitor

  1. Start an application from Remote Performance Monitor.

    Ensure that Publish to Perfmon is selected as an option by the Connect button. This option is selected by default.

  2. Start PerfMon.exe.

    This file is located in \Windows\System32.

  3. Select System Monitor in the left pane of PerfMon.exe, if it is not already selected.

  4. Right-click in the right pane, and then click Add Counters.

  5. In the Performance object list, click the category of counter that you want to graph in PerfMon.exe.

    The names of the categories correspond to the categories that appear when you view statistical data in Remote Performance Monitor. For example, the garbage collection counters are named .NET CF GC in PerfMon.exe.

  6. Click Add.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft