Performance Counter in Microsoft Windows Server 2008 :
As I have promised in my article “Performance Counter in SQL Server“, herewith, I am providing introduction about how to run Performance Counter from Microsoft Windows?
As a Database Administrator or System Administrator, you always have responsibility to monitor system performance, find bottleneck of performance which may be related to network, disk, memory, IIS, SQL Server and much more. Each admin have different responsibility to monitor different part of system, depends of the domain s/he working one. These monitoring responsibility can greatly be done with help of Performance Counter as it cater the needs of DBA, System Admin, IIS Admin and much more.
You can create your own “Data Collector Set” in “Performance Counter” with the counters you need. You have variety of choices to select in form of counter. some of the important counters are as follows:
Logical Disk counter
Physical Disk counter
SQL Server Agent counter
.NET CLR Memory counter
.NET CLR Networking counter
Internet Information Services counter
Network Interface counter
There are just few of the counters which you can use. All of the above counter has its own sub counter category. For details information about few of the important counter can be found here.
By default, when you create your own “Data Collector Set”, it will save all information in .BLG file in binary format but you can change it to other user readable format like .CSV (Comma Separated Value).
Anyway, it is up-to your choice which counter to use. I have created step wise demo which generate one “Data Collector Set” for few counters related to Network, Logical Disk & Processor.
1.) Click on Start Menu->Run and type “PerfMon.msc” and click on “Ok” button.
2.) Right click on Performance Monitor to create your own new data collector set and click on “Next” button
3.) Give name to your Data Collector Set, for eg: “Disk_Processory_Memory” and click on “Next” button
4.) Give the path where you wanted to save your performance counter file and click on “Next” button
5.) select radio button of “Start this data collector set now” and click on “Finish”
6.) Now, if you see in main window of Performance Counter, you can see your file is generated in binary format (.blg) so right click on it and click on “Property” from pop up menu.
7.) You will get pop up window which shows selected counter, you can add as much counter as your want after clicking on “Add” button from “System Monitor Log Property” popup window.
8.) Once you are done with adding counter , click on “Ok” button so that you are returned back to “System Monitor Log Property” popup window.
9.) Select “Comma Separated” log format from “System Monitor Log Property” popup window as give in above image and click on “Apply” first and then “Ok”. Now right click on your data collector set and stop collecting data and start it again so that your data will be captured in CSV file rather then in BLG file.
You are done now. You can keep collecting data as much time as you want and have a look at .CSV file in the path you have given.
Reference: Ritesh Shah
Note: Microsoft Books online is a default reference of all articles .