c# - Alert when CPU usage stays over a limit for a period of time -


I have a Windows 2003 server and I need a service code that will email me when the CPU uses 90% How can I do this more than 5 minutes?

The first thing you might have read as a processor load is:

Secondly, you have to use a timer that checks the processor time in some interval. The standard timer from .Net is sufficiently accurate when we speak 5 minutes. The interval can be something like a few seconds, you measure the CPU and if it is less than 90% then reset some start date time and if it is more than 90% then check that the start date is 5 minutes Is older than

And last you will need to send a mail like this:

This way uses a SMTP server that you install locally Or otherwise you can get SMTP correctly for one of your e-mails etc. You can send more mail without over land. Find Stackoverflow for that :)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -