Hi,
is there script available that would let us monitor particular process (by name or PID) for CPU usage and alert (start our program/script) if consumption is above certain threshold for some time. So parameters would be: process (name or PID), %threshold, duration.
Have you looked at perfmon alerts? THis is built into Windows and can send mil or execute a script or program.
type "perfmon" and read the help.
- Edited by dpetrek 21 hours 26 minutes ago
Do some research on how too use alerts. You can set the sample interval and use that as you criteria.
I can not find what you are refering to although I read perfmon help.
Can you provide a link with more informaion?
Lets say I want to monitor process abc.exe and alrt when its consumption is over 30% for 10 seconds.
How would one do that?
Searching will find many articles on ways to use perfmon alerting:
Here is one: http://www.vircom.com/security/part-2-how-to-monitor-application-performance-and-send-alerts-on-windows-server-2008/
What I want to know if threshold is reached for a certain amount of time.
You should post questions about perfmon in the platform forum or use the counters to collect samples and average as needed.
You can also just call a script every time the threshold exceeds and let the script determine if it should send an alert. This forum is not really set up to design solutions for you.
- Edited by dpetrek Tuesday, April 28, 2015 9:42 AM