■ CPU 점유율 구하기

----------------------------------------------------------------------------------------------------

using System.Diagnostics;

 

/// <summary>

/// 성능 카운터

/// </summary>

private PerformanceCounter performanceCounter = new PerformanceCounter();

 

...

 

this.performanceCounter.CategoryName = "Processor";

this.performanceCounter.CounterName  = "% Processor Time";

this.performanceCounter.InstanceName = "_Total";

 

...

 

float cpuUsage = this.performanceCounter.NextValue();

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요