How to fetch CPU and Memory Usage of IIS in C#

G

Guest

How to fetch the CPU and Memory usage of IIS in C#?

Thank you in advance.

Regards, Ravi
 
N

Nicholas Paldino [.NET/C# MVP]

Ravi,

You want to take a look at the PerformanceCounter class in the
System.Diagnostics namespace and access the appropriate performance counters
for the machine and IIS.

I don't know that IIS has a specific counter for CPU usage (you will
have to look), but you should be able to get IIS's memory usage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top