In the previous recipe, you created a simple text based report which you could expand to cover not just the CPU on the SRV1
server, but more counters across multiple machines. But they would be pure text. You could use performance monitor and the binary log files to create Perfmon graphs you could cut/paste into a report.
In this recipe, you use the data generated using the data collector mechanism to draw a graph using classes from the Windows.Forms.DataVisualization
namespace.
Like the Reporting on performance data recipe, this recipe uses CSV files from the data collection process noted earlier.
- Load the
System.Windows.Forms
andSystem.Windows.Forms.DataVisulization
assemblies:
Add-Type -AssemblyName System.Windows.FormsAdd-Type -AssemblyName System.Windows.Forms.DataVisualization
- Import the CSV data from earlier, and fix row
0
:
$CSVFile = Get-childitem -Path C:\PerfLogs\Admin\*.csv `
-Recurse...