Path and File Locations

Apr 16, 2010 at 7:09 PM

Working with Pal v2 Alpha 5, which is installed to the default c:\Program Files\PAL\PAL v2.0 Alpha 5.  I'd like to be able to store the perfmon logs (.blg) files in a different directory so that I can organize them by project or engagement. For other applciations and files I use c:\workarea as the base and then create a subdirectory for each engagement.  When I try and organize the files in this way, PAL fails to execute because it cannot fine the correct files.  I am starting PAL from the PALWizard and it generates the following command line:

C:\workarea\engagement>Powershell .\PAL.ps1 -Log 'C:\workarea\engagement\System Overview -w- Terminal Services - v1.5.3_000001.blg' -ThresholdFile 'C:\Program Files\PAL\PAL v2.0 Alpha 5\SystemOverview.xml' -Interval 'AUTO' -IsOutputHtml $True -HtmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp]_[GUID].htm' -IsOutputXml $False -XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp]_[GUID].xml' -AllCounterStats $False -OutputDir 'C:\workarea\engagement\PAL Reports' -NumberOfProcessors 8 -ThreeGBSwitch $False -SixtyFourBit $False -TotalMemory 36

It seems that the PALWizard is starting powershell in the directory that I specify for the .blg files and assumes the PAL.ps1 file will be in that directory instead of the install path.  Is there a way to modify this behavior?  If I move the .blg files to the PAL install path everything works fine, but I would like to avoid the manual step of re-organizing the files after.



p.s. I love the tool and thank you for putting so much time and effort into something that makes this poor capacity planner/performance analyst's life a little easier.

Apr 26, 2010 at 7:24 PM

Specifying the full path to the Pal.ps1 file would solve this problem (that I am experiencing as well).

[time passes]

Actually, specifying the full path does not work either, because line 335 does not specify the path to PAL.ps1 either.

Below is the awkward solution I have found to getting the directory a script was ran from...

$RanFromPath = split-path -parent $MyInvocation.MyCommand.Path


Apr 28, 2010 at 9:54 AM

To confirm I'm also having the same problem. I copied the files into the PAL directory which got the past the PAL.ps1 error but getting a different error now

C:\Program Files\PAL\PAL v2.0 Alpha 5>Powershell .\PAL.ps1 -Log 'C:\Program Files\PAL\PAL v2.0 Alpha 5\PerfWiz - 5 second interval_0427
0943.blg' -ThresholdFile 'C:\Program Files\PAL\PAL v2.0 Alpha 5\SystemOverview.xml' -Interval 'AUTO' -IsOutputHtml $True -HtmlOutputFil
eName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp]_[GUID].htm' -IsOutputXml $False -XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateT
imeStamp]_[GUID].xml' -AllCounterStats $False -NumberOfProcessors 16 -ThreeGBSwitch $False -SixtyFourBit $False -TotalMemory 12
Unable to find type [Parameter(Position=0,Mandatory=1)]: make sure that the assembly containing this type is loaded.
At C:\Program Files\PAL\PAL v2.0 Alpha 5\PAL.ps1:145 char:44
+     param ([Parameter(Position=0,Mandatory=1)]$ <<<< InputObject,[Parameter(Position=1,Mandatory=1)]$Name)

If I'm doing something silly please let me know :-)


PS. Great tool, just wanted to check the new version out.

Apr 28, 2010 at 4:07 PM

Are you running Pal using Powershell v2?