Scheduling PAL to be Triggered from a Completed Perfmon Data Collector

Feb 21, 2014 at 11:08 AM
I'm a bit new to both Perfmon & PAL. But I want to trigger a task to run PAL once a Data Collector has completed in Perfmon. I know I can trigger a Task from Perfmon and pass arguments (so that PAL looks at the correct log file):

I've tried setting Perfmon to pass the following Arguments to a Task:
".\PAL.ps1" -Log '{logs}' -ThresholdFile 'C:\Program Files\PAL\SPS2010.xml' -Interval 'AUTO' -IsOutputHtml $True -HtmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm' -IsOutputXml $False -XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml' -OutputDir 'D:\PerfMonLogs\PAL' -AllCounterStats $False -NumberOfThreads 1 -IsLowPriority $False -OS '64-bit Windows Server 2008 R2' -PhysicalMemory '8' -UserVa '2048'
I've then created a Task to run PowerShell. As I understand it PerfMon should pass the Arguments to the Task, and the PowerShell 'program'.

The task is triggered in the task Manager, but fails. I haven't managed to find any useful error messages (e.g. what actual command line was used to invoke PowerShell).

I don't seem to find any step by step instructions for doing this, just bits and pieces.

Thanks in advance for any input you guys can provide.
May 28, 2014 at 5:18 PM
Creating scheduled tasks from Perfmon alerts can be difficult and they have to start a Scheduled Task.

Here is an example of creating a Perfmon alert that starts the PerfCollector task passing in all of the data from the counter alert.

logman create alert "PerfCollector_DiskLatency1000" -th "\LogicalDisk(C:)\Avg. Disk Sec/Read>1000" -tn \Microsoft\Windows\PerfCollector\PerfCollector -targ "\"{name}\" \"{date}\" \"{counter}\" \"{threshold}\" {value}" -si 00:00:05 -el