什么是ASP .NET Apps v2.0 *的WMI类?

时间:2010-12-16 14:16:38

标签: .net windows wmi

当我在本地拉取win32 *类时,我没有看到一个类引用了在perfmon gui中显示的ASP.NET Apps v.2.0.50727计数器。如何在Windows 2003上提取2.0应用程序的WMI信息?

1 个答案:

答案 0 :(得分:1)

运行PowerShell以匹配root\cimv2中的任何WMI类:

gwmi -List "*asp*" | ft Name

给出:

Name
----
Win32_PerfFormattedData_ASPNET2050727_ASPNETAppsv2050727
Win32_PerfRawData_ASPNET2050727_ASPNETAppsv2050727
Win32_PerfFormattedData_ASPNET2050727_ASPNETv2050727
Win32_PerfRawData_ASPNET2050727_ASPNETv2050727
Win32_PerfFormattedData_ASPNET4030319_ASPNETAppsv4030319
Win32_PerfRawData_ASPNET4030319_ASPNETAppsv4030319
Win32_PerfFormattedData_ASPNET4030319_ASPNETv4030319
Win32_PerfRawData_ASPNET4030319_ASPNETv4030319
Win32_PerfFormattedData_ASPNET_ASPNET
Win32_PerfRawData_ASPNET_ASPNET
Win32_PerfFormattedData_ASPNET_ASPNETApplications
Win32_PerfRawData_ASPNET_ASPNETApplications
Win32_PerfFormattedData_aspnetstate_ASPNETStateService
Win32_PerfRawData_aspnetstate_ASPNETStateService
Win32_PerfFormattedData_RemoteAccess_RASPort
Win32_PerfRawData_RemoteAccess_RASPort

(我不认为“.”在WMI类名中有效,因此命名。)

此外,使用System.Diagnostics.PerformanceCounter,您可以直接阅读性能计数器,而无需通过WMI。