Read the Windows system monitor log and generate a report to analyze the database server performance trend

Source: Internet
Author: User

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/

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.