Connecting Tech Pros Worldwide Help | Site Map

CPU Usage in %

Newbie
 
Join Date: Mar 2008
Posts: 22
#1: Feb 3 '09
Can i know hoe to find the CPU Usage of individual Process in %.
I found the following code thru the net-
But I not getting it.
Expand|Select|Wrap|Line Numbers
  1. Private m_PerformanceCounter As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total")
  2. Dim cupcount As String = CInt(m_PerformanceCounter.NextValue()) & "%"
  3.  
Here m_PerformanceCounter.NextValue() will gives the cpu usage percentage
What we have to write in place of these
1) Processor
2)% Processor Time
3)_Total
Any help will be greatly Appreciated.
Reply


Similar Visual Basic .NET bytes