I need help with the usage of Perfromance Monitor, but the code that I tried to go with did not work. I ended up with this Sysmon( System Monitor ) and added it in a Windows Form Application. I need to learn how to track performance. Does anyone know how to use Perfromance Monitor or System Monitor? MSDN dosent help as their code dosent even work, my Visual Studio is complaining that the category is invalid and bla bla. Im using Windows Server 2008 R2 and VS2010.

I am totally new to this, so I realy need some good tutorial or any help.


Recommended Answers

You need to use WMI.

Jump to Post

All 2 Replies

You need to use WMI.

Okej so I got this working, I have implemented a System Monitor control to my windows form. And a catalog with diffrent PerformanceCounterTypes. I followed this guide:


But I can't figure out how the types works. And how do I get a avarage time?
I have a thread that sleeps for a random milliseconds between 500 and 5000 mili.
And a stopwatch to calculate the time taken... ish...

Anybody out there that is a pro in this subject?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.