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.