Many DBAs use the perfmon counter to monitor the performance of windows or SQL Server, but data storage and analysis is a problem. Many third-party tools can parse log files and save them to the database, and provide report analysis. These reports can be provided directly to the boss or server users to view the performance trend of the server. If the server needs to be resized, this report is a powerful basis.
In fact, parsing the perfmon log file is very simple, using the tool that comes with WindowsRelog.exeYou can import the data to a CSV or Excel file or directly to the database. DBAs can be used to import data from databases and customize reports.
The following are two examples:
To convert a Windows 2000 log file named win2k_log to A. CSV log file named win2k_log.csv, run the following command:
Relogwin2k_log.blg-f csv-O win2k_log.csv
Run the following command to read datacollector_combined.blg to the database:
Relog "D: \ perflogs \ cp_perfmon_collector \ datacollector_combined.blg"-f SQL-osql: perfmon_dsn! Logfile
For relog command parameters and parameter descriptions, refer:
There is a complete online example of how to automatically collect perfom data and load the data to generate a report. Here I cannot. You can refer to this example:
Http://sqlactions.com/2012/05/15/collection-and-reporting-of-perfmon-data-for-sql-server-capacity-planning-and-trend-analysis/