Back

Topic

[KB410]Checking and logging CPU and memory traces

14 years ago
By RM
Options
Print
Applies to:

PcVue all versions with support for Windows XP, 2000 and NT.

 
Summary:

This article explains how to check and log the CPU usage and memory consumption of PcVue threads.


Details:

In this method, the Performance Monitor logs the values of the counters that you configure. It uses a comma-separated values format (CSV) so you can inspect and analyze the values in Microsoft Excel.

Configuring the counts

You can check the basic stability of the PcVue application as follows.

  1. From the Windows Start button, select Programs/ARC Informatique/ PcVue xxxxx/Tools/Performance Monitor

Perf_Monitor_WinXP_ARC_Info

  1. In the System Monitor’s window bar, click on the icon to open its menu, then select Custom View to open the Customize View dialog.

Perf_System_Monitor_Customize_View_dialog

  1. Tick the boxes to open the console tree (a pane to the left) etc.
  2. In the Performance Monitor’s main menu, click on the ‘+’ icon (Add, Ctrl+I) to open the Add Counters dialog: images for (XP) and (NT)

WindowsXP_Performance_Monitor_Add_Counters_dialog

WindowsNT_Performance_Monitor_Add_To_Chart_dialog

Note

There is a delay while the analysis takes place.

  1. Set the option Use Local Computer Counters.
  2. Select these contextual settings:

Perf

  1. In the drop-down list of counters, select % Processor Time, then click on Add to include it. Repeat that for Private Bytes.

Note

When you select a counter, you can use the Explain button to display a definition of what it does.

What you see in the traces

When the application is started, the monitored values increase.

Perf_System_Monitor_Configured_for_PcVue

This is normal as the application is taking CPU resources and space in memory (for variables, mimics, buffer allocation, etc.). Over several hours (depending on the application) the mean values should stabilize.

How to configure a performance log

  1. In the Performance Monitor, open the folder Performance Logs and Alerts.

Perf_System_Monitor_Counter_Logs_PcVue

  1. Right-click on Counter Logs and select the New Log Settings to open the New Log Settings dialog.

Perf_System_Monitor_New_Log_Settings_dialog

  1. Enter a name for the new log.
  2. In the Log Properties dialog’s General tab, choose a storage location or accept the default path and name.

Perf_Log_Properties_General_tab

  1. In the section Sample Data Every…, set an interval for sampling or accept the default.
  2. Click on the Add Counters button to open the Add Counters dialog.

Perf_Add_Counters_dialog

  1. Select the option Select Local Computer Counters and the Processor from the drop-down list.
  2. In the Log Files tab, you can configure the type and name of the log file.

Perf_Log_Properties_LogFiles_tab

  1. Click its Configure button to open the dialog Configure Log Files. You can set a size limit (in megabytes).

Perf_Config_Log_Files_dialog

  1. In the Log Properties dialog’s Schedule tab, you can configure either manual or automatic starting and stopping of the logging activity.

Perf_Log_Props_Schedule_tab

  1. Close the dialogs and the Performance Monitor window.

Logging

The logging activity will run according to the schedule settings:

  • Manually when you right-click on a log and select Start or Stop.

Perf_Counter_Logs_log_context_menu

  • Automatically, starting at a specified time and stopping at a specified time or after the specified interval.

Note

You can mix the manual and automatic modes of starting and stopping.

The most useful counters to log are usually as follows:

  • Private bytes of PcVue.
  • Number of handles.
  • % CPU time for thread 0 (User Interface).
  • Process time %.

Reporting

To review the log, you open its comma-separated values file (CSV) in a tool such as Microsoft Excel.

  1. Stop the Performance Monitor:

In its left-hand pane, select Logs and Performance Alerts.Trace Logs

In its right-hand pane, right-click on the PcVue entry and select Stop

Perf_Analyzer_Log_counter_menu_stop

  1. Open the folder that you configured for storing the log file.
  2. Double-click on the log file you wish to view. It will open in whichever tool is configured to open CSV files, usually Excel.

Perf_Excel_PcVue_sample_log

You can then use the tool’s facilities to choose columns and apply headings, to round and filter the values for inspection, to highlight anomalies, to display the results graphically etc.


Created on: 26 Nov 2010 Last update: 13 May 2024