System Performance: Collecting Performance Data Using Performance Monitor (perfmon)

An easy way how to collect the performance of Windows 2012 server (similar steps may be used on other version of Microsoft operating system).

Applies to YSoft SafeQ 5 and  YSoft SafeQ 6.

Sample situation:
Imagine that there are authentication timeouts at random times of a day and you are not sure whether the situation may be caused by insufficient performance of the server (e.g. at problematic time there is a time gap visible in YSoft SafeQ log files). As you cannot know when the issue is going to happen again, you must be capturing performance data from the server until the issue occurs. However it is necessary to set size/duration capture (to avoid disk depletion; you do not need data one month backwards when the issue occurred just day ago). It will be also nice to have data rolling in specific intervals (it is more difficult to work with large capture files containing last week of capture than operating a small capture file containing the hour of capture where issue has happened).

Goals for the Configuration:

  • capturing data in production hours from 8AM till 8PM
  • rolling performance data captures in hourly intervals
  • generating a basic graphical report per captured period
  • keeping maximally 10GB of data
  • archiving old report data after three days (to minimize the size) and deleting them after 7 days


Setting up the Performance Capture

  1. Creating a collector set
    1. Run perfmon.msc
    2. Expand "Data Collector Sets" > right-click "User Defined" > New > Data collector set
    3. Set the name (e.g. "Y Soft performance check") > select "Create from a template" > Next
    4. Select "System Performance" > Next
    5. Specify the path where the outputs shall be stored > Finish

  2. Setting up a collector set
    1. Right-click your collector set > Properties > Stop condition
    2. Set Overall duration to 60 minutes and confirm it by pressing "OK"

    3. Right-click your collector set > "Data Manager"
      1. un-tick checkbox "Maximum folders"
      2. set "Resource policy" to "Delete oldest"
      3. set "Maximum root path size" to 10000MB and confirm it by pressing "OK"


  3. Setting up a scheduled task
    1. Run taskschd.msc
    2. Browse to structure "Task Scheduler Library" > Microsoft > Windows > PLA
    3. Double-click the scheduled task that has the same name as your collector set

    4. Edit the schedule in a following way:
      1. Triggers > New > Edit following settings and confirm by OK:
        • Daily, Start at current date from 8AM, reoccur every 1 days
        • Repeat task every 1 hour for a duration of 12 hours

      2. Settings
        • Queue the new instance

      3. Confirm schedule by "OK"

  4. Verify the "Next Run Time" is scheduled for the closest possible time that fits to your configuration and that Status is "Ready".

  5. Test that scheduled task works
    1. Right-click your scheduled task > Run
    2. Task "Status" must switch to "Running"
    3. Wait two minutes > Status must be still "Running"
    4. Right-click your scheduled task > End > Yes
    5. Task "Status" must switch to "Ready"

On Windows 10 and Windows 2019 the Scheduled task may stop by itself in a few seconds without generating any diagnostic data. In such a case follow:

Viewing the Collected Data

To see the collected data run perfmon.msc > Reports > User Defined > Expand the name of collector set you have defined.

Note: To understand in details to the outputs of perfmon, kindly see the documentation of your operating system or contact Microsoft technical support.

  1. You can see captures from various collectors showing the exact time the collection has started.

  2. You can right-click any output on the left side > select "View" >  "Report" and see the report the pefmon has already generated for you. The "Summary" and "Diagnostic Result" may show you general performance over the evaluated period. To display detailed data simply open a relevant category (e.g. Disk > Physical disk > see "Avg. Disk sec/Transfer").

  3. You can right-click any output on the left side > select "View" > "Performance Monitor" to see the detailed performance data. Zooming in and selecting appropriate time frame may around the time of occurrence may reveal important information (such as high CPU usage).

  4. You can right-click any output on the left side > select "View" > "Folder" to view the capture data. These data can be collected and shared with your colleagues or Y Soft customer support services when requested.