0

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.

Private m_PerformanceCounter As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total")
Dim cupcount As String = CInt(m_PerformanceCounter.NextValue()) & "%"

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.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by silambharasan
0

hello let us consider i want to show my cpu usage throw label
then use this coding
first performance counter,label,timer tick,2 button is placed in a form
in button1:(clicked)
timertick1.enabled=true
button1.enabled=false
in button2:(clicked)
timertick1.enabled=false
button2.enabled=false
button1.enabled=true
timertick :
label1.text=cint( "processor value" performance counter1.nextvalue() & "%")
execute it u get a perfect answer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.