[HOW TO] Enable Perfmon for Troubleshooting - Windows Server 2008/ Vista/ Windows Server 2008 R2

Steps to setup Perfmon data collection for troubleshooting.

1) Open up the Performance Monitor snap-in (Start -> Run -> Perfmon)

2) Expand the “Monitoring Tools” option and Right Click on “Perfomance Monitor” -> “New” -> “Data Collector Set“



3) Give the data collector set a name and click on Next



4) Give the location where you want to save the Perfmon Logs and click on Next

5) Select the option “Save and Close” and click on Finish

6) Then go back to the Perfmon snap-in main window and you should see a Data Collector set with the same name that you created under Data Collector Sets -> User Defined



7) Click on the Data Collector Set and on the right hand pane, you should see a System Monitor Log Performance Counter. Right click on it and click on properties.


    Under the Performance Counters tab, add the relevant performance counters:

     Counter  that need to be selected is Process and select below:

      - %Processor time

      - Handle count

      - Thread count

      - Virtual bytes

      - Virtual bytes peak

      - Working set

     - Working set peak

     The instances that need to be selected for each of the counters will be Mailnow, Python, Pythonservice#1, Pythonservice (all python service)


    Set the log format (comma separated) and the sample collection interval time.
   




 Under the File tab specify the file format name (YYYYMMDD).



8) Now you can start the Perfmon data collection by right clicking on the Data Collector Set and click on Start



9) Configure the data collector to restart when the computer starts.

a. Start the Task Scheduler by running Start -> Accessories -> System Tools -> Task Scheduler.



b. Browse to Task Scheduler Library -> Microsoft -> Windows –> PLA.



c. Enable Hidden Tasks (View ->  Show Hidden Tasks).
d. Right click on the 'data collector set that you created' entry in the Tasks list and select Properties to bring up the task properties window.
e. Click on the Triggers tab and click the New... button to bring up the New Trigger dialog window.
f. Select At startup from the Begin the task drop-down box and click the OK button to save the new trigger.
g. Click the OK button to close the task properties window.