性能计数器类别的名称? (C#) [英] Performance Counter Category Names? (C#)

查看:268
本文介绍了性能计数器类别的名称? (C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在性能计数器到我的C#应用​​程序,启动另一个进程,并检查该程序推出的处理器使用进行编程。据我了解,在性能计数器类需要我指定一个类别名称,计数器名称和进程名称。我能得到的进程名很轻松了,但有一些拥有所有可能的类别和计数器名称我可以分配在互联网上的列表?我试着淘MSDN这样的事情,但我没有发现任何东西。

I'm trying to program in a performance counter into my C# application that launches another process and checks the processor usage of that launched process. As I understand it, the performance counter class requires me to assign a category name , a counter name, and a process name. I can get the process name easily enough, but is there a list of some sort on the internet that has all possible category and counter names I can assign? I tried scouring MSDN for something like this, but I didn't find anything.

感谢所有帮助!

推荐答案

我想你想知道你可以监视哪些流程的各个方面。工艺性能计数器的列表,请这里
不过,你可以使用 GetCategories 静态方法来列出所有类别机,也能更具体和过程类别创建PerformanceCategory和使用的 GetCounters 来获取所有可用计数器的列表。
希望这有助于。

I think you want to know what aspects of the process you can monitor. A list of the Process Performance Counters is available here Nevertheless you can use the GetCategories static method to list all categories in the machine or you could be more specific and create the PerformanceCategory for the "Process" category and use the GetCounters to get a list of all counters available. Hope this helps.

这篇关于性能计数器类别的名称? (C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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