Sunday, October 5, 2014

Setup Performance Monitor to always collect Server performance statistics

How can we setup Performance Monitor to collect data all of the time, so we can go back and review the data when needed?
1.  Click Start, click Run, and then type perfmon.msc
2.  Click the plus sign next to "Performance Logs and Alerts" to expand
3.  Click "Counter Logs
4.  On the menu select Action -> New Log Settings and enter a name that makes sense to you.
5.  Now it will open a new window.
6.  There are three areas that you have to setup:

-      Counters to monitor: what are the areas that you want to monitor
-      Log file type: format for storing the data
-      Schedule: how often you want to track and store the collected data

7.  Setting counters: Click Add Counters to choose individual counters or if you wish you can choose Add Objects.  One thing to note is that if you select Add Objects you may add counters that you never need and it will not only waste storage, but also resources from the system.

8.  If you are not sure what information the counter will give you, you can click "Explain", it will open another window and offer an explanation of the counter that you chose.

9.  Be aware that if you collect data every 15 seconds or less it may put too much pressure on your server and also waste storage as well. Depending on what you do, you may want to choose to collect every 1 min.

10.   If you are collecting to the server locally, you do not need to set "Run As:" but if you are collecting data from a remote server, then you need to set the service account, which has proper permissions to collect the data.. The service account needs to have at least "Profiler system performance" rights from Local Security Settings. For more information, you can read this article: http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/gp/551.mspx?mfr=true

11.   Setting Log Files type: This will decide how the data will be stored once it is collected.  You can use Text file (Comma delimited) and chose End file names with: yyyymmdd.

12.   And then choose Configure.

13.   strongly recommend changing Locations to a drive other than the C drive

14.   setting Schedule: Start Log At: 12:00:00 AM on following day and Stop Log After 1 days and choose Start a new log file

15.   This will create one file each day with a filename like D:\PerfLogs\PerfMon_20080502.csv

16.   Click OK to finish this step.

17.   Before you setup the schedule, you can first run it manually by clicking the run icon.  This will let you make sure you are collecting the correct data before scheduling it to run. For the test, check to make sure it created the file correctly.

18.   Once you are done testing, go back to the Schedule section and reset the schedule correctly once again especially start a new file section.

19.   Also setup a script to delete old files, so you don't run out of space on your file system.

20.   To look at the data using Excel, just double click on the CSV file that was created to see if you are collecting the counters correctly.

One thing to remember is that there is not exact threshold for a lot of the counters to determine if there is an issue or not, so it is very important to collect performance counter data while the server is running healthy, for a baseline to measure against.

No comments:

Post a Comment