Click here to Skip to main content
13,593,097 members
Rate this:
Please Sign up or sign in to vote.
See more:
I configured many websites in IIS ("for Local network websites"). The Websites are configured as IP:port( url). I want to take the CPU usage for websites Separately using C# code. For example i want to calculate the CPU usage of website at url of, then how can i take that. I know the way of taking total CPU Usage. But needed for single website usage of CPU.

PerformanceCounter cpuCounter = new PerformanceCounter();
            puCounter = new PerformanceCounter();
            cpuCounter.CategoryName = "Processor";
            cpuCounter.CounterName = "% Processor Time";
            cpuCounter.InstanceName = "_Total";

            // will always start at 0
            dynamic firstValue = cpuCounter.NextValue();

If you know please help me on this. Thank you.
Posted 17-Jan-13 1:12am
Updated 17-Jan-13 1:14am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.180618.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100