性能监视器.NET CLR网络4.0.0.0实例命名 [英] Performance Monitor .NET CLR Networking 4.0.0.0 Instance naming

查看:301
本文介绍了性能监视器.NET CLR网络4.0.0.0实例命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用性能计数器就确定我的应用程序有多少字节发送或接收。我跟着建议的解决方案在这里找到: C#:带宽,但我的应用程序的实例中不显示在.NET CLR网络的范畴。异常消息:

  

实例应用程序名称[8824]'不指定存在   类别

(我已经添加了< performanceCounters启用=真/> 在我的App.config中,它仍然不能经过一些网络活动中)

于是我开始性能监视器,以便看到错误我自己的眼睛。正如预期的那样,我的应用程序不能在现身的 .NET CLR网络的范畴,但它可以幸运被在 .NET CLR网络4.0.0.0 的类别。<发现/ P>

不过,我的问题是,我无法弄清楚实例名称是如何产生的。这里是我的实例在性能监视器看到的名称: ApplicationName.exe_p4952_r15_ad1

到目前为止,我已经想通了,第一件必须由 ProcessName PID ,但我 不知道最后两个(R15AD1)展品来自什么。

是否有人有什么线索的最后两件可以?

一个解决办法是枚举所有的.NET CLR网络4.0.0.0类别中找到的情况下,搜索ApplicationName.exe_PID *,但将preFER直接寻找正确的名称(如果可能) 。

解决方案

检查这链接上名字怎么建更多的信息。总之RXX是公共语言运行库(实例)的执行你的code的运行ID。

这个新的命名约定成立,使在并排侧的情况(在那里你有一个过程不止一个CLR实例,这是开始.NET 4.0中的新功能),你实际上可以区分性能计数器。

在adXX是不是在页面上所述,但是从首字母缩写词我想这代表了应用领域。该数字可能可能是 AppDomain.Id 的应用领域。

I'm trying to use a Performance Counter do determine how many bytes my application has sent or received. I followed the suggested solution found here: C#: bandwidth, but the instance of my application doesn’t show up in the ".NET CLR Networking" category. Exception message:

"Instance 'ApplicationName[8824]' does not exist in the specified Category"

(I have added <performanceCounters enabled="true"/> in my App.config and it still it cannot be found after some networking activities)

So I started Performance Monitor so see the error with my own eyes. As expected, my application doesn't show up in the .NET CLR Networking category, but it can luckily be found in the .NET CLR Networking 4.0.0.0 category.

However, my problem is that I cannot figure out how instance name is generated. Here is the name of the instance I see in the Performance Monitor: ApplicationName.exe_p4952_r15_ad1.

So far I have figured out that the first parts must be made of ProcessName and PID, but I have no clue what the last two ("r15" and "ad1") pieces come from.

Does somebody have a clue what the last two pieces could be?

One solution would be to enumerate all the instances found in the ".NET CLR Networking 4.0.0.0" category and search for ApplicationName.exe_PID*, but would prefer to look for the correct name directly (if possible).

解决方案

Check this link for more information on how the name is built. In short the "rXX" is the runtime ID of the common language runtime (instance) that executes your code.

This new naming convention was established so that in side-by-side scenarios (where you have more than one CLR instance in a process; which is a new feature starting with .NET 4.0) you can actually differentiate the performance counters.

The "adXX" is not described on the page above, but from the acronym I'd suppose it stands for Application Domain. The number could possibly be the AppDomain.Id of the application domain.

这篇关于性能监视器.NET CLR网络4.0.0.0实例命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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