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.
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.