16,554
社区成员
发帖
与我相关
我的任务
分享
Set lockAndThreads = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads where Name='_Global_'")
For Each objItem in lockAndThreads
Wscript.Echo "NumberofcurrentlogicalThreads: " & objItem.NumberofcurrentlogicalThreads
Wscript.Echo "NumberofcurrentphysicalThreads: " & objItem.NumberofcurrentphysicalThreads
Wscript.Echo "TotalNumberofContentions: " & objItem.TotalNumberofContentions
Wscript.Echo "CurrentQueueLength: " & objItem.CurrentQueueLength
Next
Set memory = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PerfRawData_NETFramework_NETCLRMemory where NAME='_Global_'")
For Each objItem in memory
Wscript.Echo "NumberBytesinallHeaps: " & objItem.NumberBytesinallHeaps
Wscript.Echo "PercentTimeinGC: " & objItem.PercentTimeinGC
Next
Set exceptions = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PerfRawData_NETFramework_NETCLRExceptions where NAME='_Global_'")
For Each objItem in exceptions
Wscript.Echo "NumberofExcepsThrown: " & objItem.NumberofExcepsThrown
Next
Set jit = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PerfRawData_NETFramework_NETCLRJit where NAME='_Global_'")
For Each objItem in jit
Wscript.Echo "PercentTimeinJit: " & objItem.PercentTimeinJit
Next
Set security = objWMIService.ExecQuery( _
"SELECT * FROM Win32_PerfRawData_NETFramework_NETCLRSecurity where NAME='_Global_'")
For Each objItem in security
Wscript.Echo "TotalRuntimeChecks: " & objItem.TotalRuntimeChecks
Next
Set system = objWMIService.ExecQuery( _
"SELECT * FROM Win32_OperatingSystem")
For Each objItem in system
Wscript.Echo "Caption: " & objItem.Caption
Next
WScript.Quit(0)