加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

从ASP.NET工作进程ID获取性能计数器实例名称(w3wp#XX)

发布时间:2020-12-15 23:22:52 所属栏目:asp.Net 来源:网络整理
导读:我想使用.NET / Process性能计数器在网页上显示一些内存统计信息(工作集,GC等).不幸的是,如果在该服务器上有多个应用程序池,则使用索引(#1,#2等)进行区分,但是我不知道如何将进程ID(我拥有)与#xx索引相匹配.有没有编程方式(从ASP.NET网页)? 解决方法 Google
我想使用.NET / Process性能计数器在网页上显示一些内存统计信息(工作集,GC等).不幸的是,如果在该服务器上有多个应用程序池,则使用索引(#1,#2等)进行区分,但是我不知道如何将进程ID(我拥有)与#xx索引相匹配.有没有编程方式(从ASP.NET网页)?

解决方法

Google首次登入:

Multiple CLR performance counters appear that have names that resemble “W3wp#1”

When multiple ASP.NET worker processes
are running,Common Language Runtime
(CLR) performance counters will have
names that resemble “W3wp#1” or
“W3sp#2″and so on. This was remedied
in .NET Framework 2.0 to include a
counter named Process ID in the .NET
CLR Memory performance object. This
counter displays the process ID for an
instance. You can use this counter to
determine the CLR performance counter
that is associated with a process.

KB 281884:

By default,Performance Monitor
(Perfmon.msc) displays multiple
processes that have the same name by
enumerating the processes in the
following way:

Process#1 Process#2 Process#3

Performance Monitor can also display
these processes by appending the
process ID (PID) to the name in the
following way:

Process_PID

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读