Bling.ps1 (a functional proof of concept for PAL v2.0)

Dec 31, 2008 at 11:06 PM

Work on PAL v2.0 (PowerShell version) is coming along nicely. While working on it, I created a proof of concept, yet functional, PowerShell script called Bling.ps1 which will read a performance monitor log (BLG or CSV) and will create graphical charts for all of the counters in it. PAL v1.x only creates charts and stats for performance counters named in the threshold files, so this is a new feature. Attached are a few sample charts that it produces from a perfmon log. Oh, and BLING stands for BLg INto imaGes.

Bling.ps1 v1.0 (Proof of Concept for PAL 2.0)

No installation is required, but dependent, free, products are required.

Required Products (free):
 - PowerShell v1.0 or greater.
 - Microsoft .NET Framework 3.5 Service Pack 1
 - Microsoft Chart Controls for Microsoft .NET Framework 3.5

Bling.ps1 /LOG:[AbsolutePathToPerfmonLog[;AbsolutePathToPerfmonLog] /OUTPUTDIR:[AbsolutePathToOutputDirectory]

Note: Use full, absolute paths in each of the arguments.

Basic Example:
.\Bling.ps1 /LOG:C:\Users\clinth\Documents\SamplePerfmonLog.blg /OUTPUTDIR:C:\Users\clinth\Documents\Output

See the Readme.txt file on the release page for more details.

Note: Be sure to set PowerShell to unrestricted access by typing the following command in an elevated PowerShell command prompt:
Set-ExecutionPolicy Unrestricted

Special Thanks to Greg Varveris for his help with understanding the Microsoft Chart Controls for Microsoft .NET Framework 3.5.

Jan 2, 2009 at 2:26 PM
Hi Clint & Happy New Year!

I have downloaded and installed all the required components, but i cannot get it work.

Here is the output:

WARNING: Unable to load the Microsoft Chart Controls for Microsoft .NET Framework 3.5. These controls used to create
graphical charts. Please install these free controls from
WARNING: If you have installed the Microsoft Chart Controls, then ensure that the assembly is located in the default
directory "C:\Program Files (x86)\Microsoft Chart Controls\Assemblies\System.Windows.Forms.DataVisualization.dll"
WARNING: Please post errors or problems with this tool to the PAL web site located at with
the following error message and a brief description of what you were trying to do. Thank you.
Exception calling "LoadFile" with "1" argument(s): "The system cannot find the file specified. (Exception from HRESULT:
At D:\temp\Bling_v1.0\PAL.ps1:27 char:39
+ [Void] [Reflection.Assembly]::LoadFile( <<<< "C:\Program Files (x86)\Microsoft Chart Controls\Assemblies\System.Windo


The missing DLL can be found in C:\Program Files\Microsoft Chart Controls\Assemblies\System.Windo
ws.Forms.DataVisualization.dll" and not C:\Program Files (x86)\Microsoft Chart Controls\Assemblies\System.Windo

Note the  (x86) is this something expected? Meaning do i need to install the chart control in C:\Program Files (x86) while it got installed by default in C:\Program Files


Jan 5, 2009 at 9:28 AM
I am *very* sorry. I just realized that I zipped up PAL.ps1, when I meant to zip up Bling.ps1 in the zip file. I just fixed it and now the zip should have the correct Bling.ps1 script. If you downloaded the Bling.ps1 source code file which is the same thing, then that should work.

Bling.ps1 and PAL v2.0 (still under development) both require the new Microsoft Chart Controls. I don't know of any other way in PowerShell to access them other than by their default file path. When you install a 32-bit application such as these tools on a 64-bit computer such as my laptop, it will create an x86 directory path for it, hence why you see x86 in the path. In any case, I put a lot of logic into the Bling.ps1 script to look for both an x86 directory path as well as a path without it. It should only fail if both paths are incorrect such is the case if you installed the chart components in a non-default file location.

Thank you for trying it! I'm looking forward to the feedback.
Jan 5, 2009 at 12:25 PM
No worries Clint!

I have tried it now, the first remark is on the switches (/LOG /OUTPUTDIR), they are case sensitive, it does not bothers me, simple worth a note in the readme.
The tool did the job on my large BLG, no error reported, i am looking forward for the V2.0, and i am happy to conduct some beta test if you need it.


Jan 8, 2009 at 7:13 AM
Great! I'm glad it worked. Thanks for the note about the case sensitivity on the arguments. I'll fix that in the next release.
Also, right now the script creates a subdirectory under the output directory to put all of the charts. It uses a GUID for the name of the sub folder. I plan on changing that to be similar to how PAL 1.x does it today by making the directory [LogFileName]_PAL_ANALYSIS_[DateTimeStamp] by default.