Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I am developing one application in that I have to display CPU usage history graph and Pagefile usage history graph.
When we open task manager it will display window, in that performance tab it will display CPU usage history graph and Pagefile usage history graph.
How to get those graphs from Task manager using vb.Net.
If anybody know about this please provide me some source code to complete this task.
To get the CPU Usage speed from taskmanager I used the following code

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.

If anybody know about how to display those graphs, please provide me some source code to complete this task.

Thanks
pavani
Posted

1 solution

You'll have to make the graph youself from the values. There are several graph libraries on CodeProject, such as this one[^] and this one[^].
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900