获取IIS中特定网站的CUP使用情况 [英] Get CUP usage for Particular website in IIS

查看:84
本文介绍了获取IIS中特定网站的CUP使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在IIS中配置了很多网站(用于本地网络网站)。网站配置为IP:端口(192.168.0.1:81 url)。我想分别使用C#代码来获取网站的CPU使用率。例如,我想计算网址在192.168.0.1:84的网站的CPU使用率,那我该怎么做呢。我知道采用总CPU使用率的方法。但需要单个网站使用CPU。



Hi,
I configured many websites in IIS ("for Local network websites"). The Websites are configured as IP:port(192.168.0.1:81 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 192.168.0.1:84, 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.

推荐答案





应用程序池类 [ ^ ]



几个信息......

调试诊断工具v1.2 [ ^ ]



http://blogs.msdn.com/b/ace_team/archive/2008/08/11/asp-net- performance-high-cpu-utilization-case-studies-and-solutions.aspx [ ^ ]



如何使用IIS管理器获取工作者进程(w3wp.exe)详细信息 ? [ ^ ]
Hi,

App Pool Class[^]

Few info...
Debug Diagnostic Tool v1.2[^]

http://blogs.msdn.com/b/ace_team/archive/2008/08/11/asp-net-performance-high-cpu-utilization-case-studies-and-solutions.aspx[^]

How to use IIS Manager to get Worker Processes (w3wp.exe) details information ?[^]


这篇关于获取IIS中特定网站的CUP使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆