Too many people all over the world tell DBAs and System Administrators to collect Perfmon data to help analyze performance metrics and resource consumption on their Windows-based servers, but no one has had a clear solution for how to actually do this. Heraflux is proud to contribute to one of our custom utilities, a PowerShell-based script that helps to automate the process of extracting the Perfmon output BLG files and loading them into a SQL Server database so that DBAs can analyze the results. We also have provided some sample queries for how to mine the data to produce trends and capacity information that is useful to the users of this utility.
This utility works for all servers at the Windows layer, both on-prem physical servers, virtual servers, or IaaS-hosted servers in the public cloud. All that you need is access to Windows Perfmon.
This script is hosted at GitHub at the open repository https://github.com/heraflux/BLGtoSQL.
To start, setup Perfmon on your servers as our free PDF Perfmon configuration instruction guide specifies. This guide walks you through how to set up Windows Perfmon so that it collects the relevant and important counters at a reasonable frequency, stores them in an easy-to-identify format on your file system, and cleans up after itself so that it does not consume all of your disk space.
Next, set up a target database on one of your SQL Servers. The