×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 23782899, Entry date: 11/14/2018
(3)
Rate

How do you save the diagnostics data of the Windows system monitor (performance monitor) in a file?

  • Entry
  • Associated product(s)
Using the Windows performance monitor for diagnostics.

Procedure for Windows 10, Windows Server 2012 and Windows Server 2016


Anleitung
The system monitor (performance monitor) integrated in the Windows operating system is designed to detect resource bottlenecks in the system. The system monitor supports detailed monitoring of the operating system resources used. It provides the option of cyclically recording the system resources and saving them in a file. The data gathered can be shown as a graph in relation to time. Detailed information is available in Microsoft's Online Help.

No.Procedure
1

Start the Windows system monitor with "Start > Browse> Systerm Monitor. 
The System Monitor (also called Performance Monitor) opens.

2

In the left window pane you open Data Collector Sets > User Defined > New > Data Collector Set. Enter a name, select the "Create manually (Advanced)" and click the "Next" button.
Select "Create data logs > Performance counter" and click the "Finish" button.

Alternative

Use a data collector set template
 Registration required  process_instance_all_120sec.xml (4.8 KB) 

Download the attached data collector set template. Check with our Technical Support whether this template is suitable for your needs. If necessary, you will receive an adjusted template from our Technical Support.

In the left window pane you open Data Collector Sets > User Defined > New > Data Collector Set. Enter a name, select the "Create from template (recommended)" and click the "Next" button. Click the "Browse..." button. Select the path in which you have saved the template. Select the template and click the "Open" button. Press the "Next >" button. Select the root directory where the data is to be stored and then press the "Finish" button. The steps 3 to 7 are already preset in this template.

Continue with Point 8.

3Right-click the newly created data collector set to open its Properties.
Select the "Directory" tab.
Select the root directory, leave the subdirectory empty, leave the format for the subdirectory name empty, do not mark the "Prepend computer name to subdirectory name" option and enter "1" for the serial number.
Select the "Stop conditions" tab.
Under Limits you select the "Restart data collector set on reaching a limit" option and the "Maximum size: 20 MB" option.
Click "OK" to save the settings.
4In the right window pane you select the data collector set you created. Right-click the DataCollector01 file to open the Properties. Open the "Performance counter" tab. Click the "Add..." button.
5In the top section of the left window pane you select the "Process" performance counter and in the bottom section <All Instances>. Click the "Add >>" button. Click the "OK" button to close the dialog.
6This takes you back to the Properties dialog of the DataCollector01 file in the "Performance counter" tab.
Set the following in the "Log format" option: "Binary" and in the Sampling interval option you set: "120 seconds".
7Open the "File" tab. Set the File format option to "yyyyMMddN". Select the "Prepend computer name to file name" option. In the "Log mode" option you deselect all the items (Overwrite, Attach, Circular...).
Click the "OK" button to close the Properties dialog.

Note
If you select "Circular" together with "Maximum size", you obtain a cyclic performance monitor log - in this case ONLY one file as specified with "Maximum size" is recorded. The recording runs permanently (endlessly), but only as much "history" is recorded as defined in the file size.
8

Start the Performance Monitor with the "Action > Start" button in the toolbar.
Stop the Performance Monitor with the " "Action > Stop" button in the toolbar.

Important
Since a great volume of data can quickly grow, you should not use the system drive as storage location but another drive that has sufficient memory available.
It is recommended to start and then stop recording for a few recording intervals (20). You can then calculate the memory requirement for long-term recordings from the current file size.

Further Information
What diagnostics options are available for WinCC and PCS 7 OS? 48698507

Procedure for Windows 7 and Windows Server 2008


Instructions
The system monitor (performance monitor) integrated in the Windows operating system is designed to detect resource bottlenecks in the system. The system monitor supports detailed monitoring of the operating system resources used. It provides the option of cyclically recording the system resources and saving them in a file. The data gathered can be shown as a graph in relation to time. Detailed information is available in Microsoft's Online Help.
 

No. Procedure
1 Start the Windows system monitor with "Start > All Programs > Accessories > Run. Enter "perfmon" in the "Open:" line and then click the "OK" button.
Click the Windows Start button and enter "perfmon" in the search field. Start the "perfmon" program.
The System Monitor (also called Performance Monitor) opens.
2

In the left window pane you open Data Collector Sets > User Defined > New > Data Collector Set. Enter a name, select the "Create manually (Advanced)" and click the "Next" button.
Select "Create data logs > Performance counter" and click the "Finish" button.


Alternative

Use a data collector set template
 Registrierung notwendig  process_instance_all_120sec.xml (4,8 KB)

Download the attached data collector set template. Check with our Technical Support whether this template is suitable for your needs. If necessary, you will receive an adjusted template from our Technical Support.

In the left window pane you open Data Collector Sets > User Defined > New > Data Collector Set. Enter a name, select the "Create from template (recommended)" and click the "Next" button. Click the "Browse..." button. Select the path in which you have saved the template. Select the template and click the "Open" button. Click the "Next" button and then the "Finish" button. The steps 3 to 7 are already preset in this template.

Continue with Point 8.

3Right-click the newly created data collector set to open its Properties.
Select the "Directory" tab.
Select the root directory, leave the subdirectory empty, leave the format for the subdirectory name empty, do not mark the "Prepend computer name to subdirectory name" option and enter "1" for the serial number.
Select the "Stop conditions" tab.
Under Limits you select the "Restart data collector set on reaching a limit" option and the "Maximum size: 20 MB" option.
Click "OK" to save the settings.
4 Right-click in the right window pane to open the Properties of the DataCollector01 file. Open the "Performance counter" tab. Click the "Add..." button.
5 In the top section of the left window pane you select the "Process" performance counter and in the bottom section <All Instances>. Click the "Add >>" button. Click the "OK" button to close the dialog.
6 This takes you back to the Properties dialog of the DataCollector01 file in the "Performance counter" tab.
Set the following in the "Log format" option: "Binary" and in the Sampling interval option you set: "120 seconds".
7 Open the "File" tab. Set the File format option to "yyyyMMddN". Select the "Prepend computer name to file name" option. In the "Log mode" option you deselect all the items (Overwrite, Attach, Circular...).
Click the "OK" button to close the Properties dialog.

Note
If you select "Circular" together with "Maximum size", you obtain a cyclic performance monitor log - in this case ONLY one file as specified with "Maximum size" is recorded. The recording runs permanently (endlessly), but only as much "history" is recorded as defined in the file size.
8 Start the Performance Monitor with the "Start data collector set" button in the toolbar.
Stop the Performance Monitor with the "Stop data collector set" button in the toolbar.

Important
Since a great volume of data can quickly grow, you should not use the system drive as storage location but another drive that has sufficient memory available.
It is recommended to start and then stop recording for a few recording internals (20). You can then calculate the memory requirement for long-term recordings from the current file size.


"Procedure for Windows 2000/2003 Server/XP">Procedure for Windows 2000/2003 Server/XP

Instructions
The system monitor (performance monitor) integrated in the Windows operating system is designed to detect resource bottlenecks in the system. The system monitor supports detailed monitoring of the operating system resources used. It provides the option of cyclically recording the system resources and saving them in a file. The data gathered can be shown as a graph in relation to time. Detailed information is available in Microsoft's Online Help.
 

No. Procedure
1 Start System Monitor
Start the Windows system monitor with "Start > Settings > Control Panel > Administrative Tools > Performance".  The System Monitor (also called Performance Monitor) opens.

 


Fig. 01
2 Create new performance counter log
In the tree structure in the left window you select "Console Root > Performance Logs and Alerts > Performance Counter Logs". Right-click to open the pop-up menu in the working area (right window) and select the entry "New Log Settings...". The "New Log Settings" dialog opens. In the "Name" field you enter the name of the log and acknowledge with the "OK" button.

 


Fig. 02
 

The newly created performance counter log is displayed in the working area.

3 Parameterize the performance counter log
In the working area you double-click the performance counter log to be parameterized. A dialog opens for parameterizing the performance counter log.
  • "General" tab
    In the "General" tab, in the "Sample data every:" area you define the interval with which the data is to be written cyclically to the file.

    In the "General" tab you add the required performance counters. For this you use the "Add Objects..." and/or "Add Counters..." buttons.
     

    Fig. 03
      
    Example
    In the "General" tab you click the "Add Objects..." button. The "Add Objects" dialog opens.
     

    Fig. 04
      
    If data objects from other computers in the network are to be logged, you select the "Select data objects from" selection field and you enter the name of the computer concerned in the appropriate field. If data objects of your own computer are to be logged, you select "Use local data objects".

    Example
    You select the entries "Process", "Processor", "Memory" and "LogicalDisk" in the "Data objects" selection list and click the "Add" button. Press and hold the "CTRL" or "SHIFT" key when selecting with the mouse to select multiple entries in the list. Close the dialog "Add Objects" dialog. The counters selected for logging are shown in the "Counters" list.
     

    Fig. 05
     
  • "Log Files" tab
    In the "Log Files" tab you can make the settings for the log file (file type, name, storage location, maximum file size, for example).
     

    Fig. 06
     
  • "Schedule" tab
    In the "Schedule" tab you can define when logging is to be started and stopped.
     

    Fig. 07
     
    For this example we have selected manual starting and stopping of the log file.
    Click the "OK" button to close the dialog.
4 Configure the System Monitor for displaying the logged performance counters
In the left window you select the "System Monitor" entry in the tree structure. A graph window is shown in the working area for displaying the performance counters. Right-click to open the pop-up menu in the graph area (working area of the system monitor). You select the "Properties..." item.

 


Fig. 08
 

The "System Monitor Properties" dialog opens.

  • "Source" tab
    Switch to the "Source" tab. In the "Data source" area you select "Log files". Then click the "Add..." button and in the "Select log file" dialog you select the log file required.
     

    Fig. 09
     
  • "Data" tab
    Switch to the "Data" tab. Add the counters that you wish to have displayed.
     

    Fig. 10

Using the "Show current process" button in the toolbar of the "System Monitor" you can have the current sequence of the system monitor shown.


Fig. 11

Using the "Show log data" button in the toolbar of the "System Monitor" you can have the current sequence of the system monitor shown.

Fig. 12


Notes

  • The only performance counters available are those used in the performance counter log used. If performance counters of specific processes and programs (script.exe, for example) are to be displayed, then those processes and programs must be started so that their counters can be selected for display.
  • If necessary, change the value range of the y axis (vertical scaling), the factor for displaying the individual performance counters.
5 Save the system monitor settings
With the menu command "File > Save as..." you save the current settings of the system monitor. The settings are saved as an *.msc file (Microsoft Management Console File).
6 Start/Stop and display of the log
In the tree structure in the left window you select "Console Root > Performance Logs and Alerts > Performance Counter Logs". Open the pop-up menu for a performance counter log in the working area. Select the Start Item or Stop Item.

Recording of a performance counter log can only be started or stopped by the user. Whether a performance counter has been started or stopped is indicated by the color of the icon next to the name of the log.
  •  Red means that the performance counter log has been stopped.
  •  Green means that the performance counter log has been started.

 


Fig. 13
 

Once a performance counter log has been started you can close the system monitor (performance monitor). The data for the performance counter log started continues to be acquired even when the system monitor is closed. If the data is to be displayed, you can start the system monitor again and select the configuration file saved in Step 4 using the menu item "File > Open...".

Note
When you open the Microsoft Management Console file, you should update the time range of the display, because new data might have been written to the log file since the last configuration.

 


Fig. 14

Notes

  • Display the current performance counters even when recording in the file has been stopped
    Even when a performance counter log has just been stopped (in other words there is currently no data acquisition in the log file), you can have the current values of the performance counters configured displayed graphically in the system monitor. For this you open the "System Monitor Properties" dialog (as described in Step 4) and switch to the "General" tab. Check the "Sample automatically every: 1 seconds" check box. In the associated input field you can change the update time.
  • Rapid access to control functions via the menu bar in the system monitor's working area
    You can have a menu bar displayed in the working area of the system monitor. Using this menu bar you can rapidly access the control functions of the system monitor. 
  • Control logging via the Windows command line
    You can also create, configure, start and stop the performance counter logs via the Windows command line. Detailed information on this is available in the Microsoft Online Help or by entering the command "logman /?" in the DOS prompt to obtain a description of the possible commands.
    You can call the command line commands of the performance counter logs in the script in a WinCC picture in order to be able configure, start and stop performance counter logs from a WinCC picture during WinCC Runtime.
  • Define the acquisition cycle
    You must adapt the acquisition cycle to each individual application case. You should set the acquisition cycle as short as just required so as not to unnecessarily load the system resources.
  • Log file size
    Make sure that the log file does not exceed the memory available. For this reason you should save the recorded data at sufficiently short intervals and then delete the log file to free up memory again. Entry 23757729 describes how to determine the memory requirement of a log file. Note that short acquisition cycles cause rapid growth of file size.
  • Diagnostics via the network
    Since diagnostics with the system monitor can cause additional load to the system, it might be useful to run diagnostics from a different computer in the network. For this see the instructions in Step 3.
  • Performance counters of processes
    If you wish to log performance counters of specific processes, those processes must be started when the log is created. The processes and their performance counters will then be offered for selection when configuring the log.
Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.