Hello there,
I am looking to monitor my cpu load for a time period say 1 minute, throughout the time period i want to check if the cpu load has not exceeded 80% for the ENTIRE period, to ensure there is no random spike. Is there an existing function which has similar functionality to this?
i have found a wmi call which grabs the cpu load but this just gets a snapshot and it does not monitor the cpu load for a durational period.
I could write something which grabs the cpu value fora given time period but this would be very resource intensive
any suggestions to this problem?
any help you can give would greatly be appreciated
many thanks
1 reply to this topic
#1
Posted 14 October 2010 - 09:04 AM
|
|
|
#2
Posted 19 October 2010 - 04:26 AM
As far as I know, there is no way to get integral of CPU usage for a period of time except that you make sample and then sum/average them.
Easiest way to get system performance metrics from .NET is to read Performance Counters. That method does not spend too much resources. Here is code example which reads CPU usage. You can use perfmon.exe to find out which counters are registered.
Easiest way to get system performance metrics from .NET is to read Performance Counters. That method does not spend too much resources. Here is code example which reads CPU usage. You can use perfmon.exe to find out which counters are registered.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









