Using PerfMon to Track Process Performance of NI Software

Updated May 29, 2020

Issue Details

I am using NI software and I need to track the performance of one or more processes. How can I track and log system and process information on a Windows operating system?

Solution

In addition to the built-in performance tracking NI software products offer, there are also Windows system tools available for monitoring almost every type of performance, including CPU, memory, file system and network usage. Although Windows Task Manager offers a quick look at live processor and memory usage, there may be instances where a snapshot view is insufficient.

There is a Windows utility called Windows Performance Monitor (PerfMon) that has the ability to graph and log performance metrics for specific processes, as well as set alarms and timing for performance monitoring and logging. 

For more information on what PerfMon can track and the different views you can use in Performance Monitor, see Windows documentation on their product. 



Example: Using PerfMon to Monitor LabVIEW Processes

Steps to View and Log Performance Data Using Windows 7 Performance Monitor:
  1. Make sure LabVIEW is open.
  2. Click on the Start Menu and click Run....
  3. Type perfmon into the Run command prompt and click OK.

                                                
 
  1. You will then see the Performance Monitor pop up.

 
  1. Click on the green ‘+’ sign near the top of the Performance Monitor Window to bring up the Add Counters window.
  2. On the left, choose which counters to add and click Add >>. Your counters should now appear under Added Counters. Click OK.
 

There are many options for what counters to add. A few that may be of special note when dealing with LabVIEW performance issues are:
  • Memory
  • Processor
  • Process (shown above): Under process, one can choose specific programs to monitor. In the upper left Window, you can select the aspects of the process that you’d like to monitor such as % Processor Time or Virtual Bytes. In the lower left hand window, you can select which process you’d like to monitor. Above, LabVIEW has been selected.
  1. Now you should be able to see all chosen counters updating on the graph.

       
 
  1. In order to log this data to file, right-click on Performance Monitor and select New»Data Collector Set.

 
  1. Type in a name for your data set and press Next.

      
 
  1. Complete the rest of the steps including choosing the location you want to save your log file.
  2. When you want to start logging the performance data, right-click on your Data Collector Set and select Start. To stop logging, right-click and select Stop.


Note: PerfMon provides ActiveX properties and methods, allowing you to control it through another ADE and even use it as an embedded control in an application.
 

Additional Information