This what's in the help:
Code: Select all
Options (alert):
-[-]el Enable/Disable event log reporting.
-th <threshold [threshold [...]]> Specify counters and their threshold
values for and alert.
-[-]rdcs <name> Data collector set to start when alert fires.
-[-]tn <task> Task to run when alert fires.
-[-]targ <argument> Task arguments.
-si <[[hh:]mm:]ss> Sample interval for performance counter data
collectors.
So it turned out that the task is a scheduled task.Here is how you can create alert triggered command (will start notepad if cpu is loaded more than 5%):
Code: Select all
@echo off
:: requires admin permissions
::Creating an "on demand" task scheduled far in the past
SCHTASKS /create /tn notepad__task /tr "C:\Windows\notepad.exe" /sc ONCE /sd 01/01/1910 /st 00:00
logman stop notepad__ 2>nul 1>&2 & logman delete notepad__ 2>nul 1>&2
logman create alert notepad__ -th "\Processor(_Total)\%% Processor Time>5" -tn "notepad__task"
logman start notepad__
May be more than a half of the logman options are unclear to me (-mode , cfg adverb , what are the providers ,-mgt and so on... ).
If someone else has a willingness to share something will be glad to read (when I'm in the right mood to research more I'll share what I've found
