monitoring CPU usage per process and alerting

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.

April 28th, 2015 5:32am

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.

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 5:40am

Yes I have, Perfmon would be ideal since it is integrated in OS. However I do not see functionality that would allow me to set alert to fire after certain threshold is met for some time. Alert fires immediately after threshold is met which is not what I want. Maybe I'm missing somethng.
  • Edited by dpetrek 21 hours 26 minutes ago
April 28th, 2015 5:42am

Do some research on how too use alerts.  You can set the sample interval and use that as you criteria.

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 5:49am

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?

April 28th, 2015 6:27am

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/

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 6:38am

I have seen this article, together with many others I have stumbled upon while searching however are you sure "sample interval" answers my question? If I understand well sample interval specifies how often samples are taken. Values are not any kind of averages, but values at the point of time.
What I want to know if threshold is reached for a certain amount of time.
April 28th, 2015 7:49am

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.

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 8:15am

Yes I have, Perfmon would be ideal since it is integrated in OS. However I do not see functionality that would allow me to set alert to fire after certain threshold is met for some time. Alert fires immediately after threshold is met which is not what I want. Maybe I'm missing somethng.
  • Edited by dpetrek Tuesday, April 28, 2015 9:42 AM
April 28th, 2015 9:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics