Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Wed, 2 Apr 2008 06:38:07 -0700,    group: microsoft.public.win32.programmer.wmi        back       


WMI & Performance objects   
Hi everybody.
How can i get list of performance objects from WMI ?!

Like :
.NET CLR Exceptions
.NET CLR INTEROP
...
Browser
Cache
...
TCP
Telephony

Which class contains this collection ?

Thanks,
Denis.
date: Wed, 2 Apr 2008 06:38:07 -0700   author:   part

RE: WMI & Performance objects   
"part" wrote:

> Hi everybody.
> How can i get list of performance objects from WMI ?!
> 
> Like :
> .NET CLR Exceptions
> .NET CLR INTEROP
> ...
> Browser
> Cache
> ...
> TCP
> Telephony
> 
> Which class contains this collection ?
> 
> Thanks,
> Denis.


You could try this query:

Select * From Meta_Class Where __SuperClass = "Win32_PerfRawData" Or 
__SuperClass = "Win32_PerfFormattedData"

-- 
urkec
date: Wed, 2 Apr 2008 13:07:00 -0700   author:   urkec

RE: WMI & Performance objects   
i need a list of captions :

-.NET CLR Exceptions
-.NET CLR INTEROP

In your query captions are empty.

Best Regards, 
Denis.

"urkec" wrote:

> "part" wrote:
> 
> > Hi everybody.
> > How can i get list of performance objects from WMI ?!
> > 
> > Like :
> > .NET CLR Exceptions
> > .NET CLR INTEROP
> > ...
> > Browser
> > Cache
> > ...
> > TCP
> > Telephony
> > 
> > Which class contains this collection ?
> > 
> > Thanks,
> > Denis.
> 
> 
> You could try this query:
> 
> Select * From Meta_Class Where __SuperClass = "Win32_PerfRawData" Or 
> __SuperClass = "Win32_PerfFormattedData"
> 
> -- 
> urkec
date: Thu, 3 Apr 2008 03:37:00 -0700   author:   part

RE: WMI & Performance objects   
urkec,
i need to create structure like in Administrative Tools > Performance
(section "add obejcts" when you create "New Log Settings" )
date: Thu, 3 Apr 2008 03:43:03 -0700   author:   part

RE: WMI & Performance objects   
"part" wrote:

> urkec,
> i need to create structure like in Administrative Tools > Performance
> (section "add obejcts" when you create "New Log Settings" )

For each Win32_Perf* class there is a qualifier named "DisplayName" which is 
the name of performance object as seen in Performance Monitor. Also, each 
property has the same qualifier, which is the name of the counter in 
Performance Monitor. I don't know what you use to acces WMI, but here is a 
VBS script that lists those:

Const wbemFlagUseAmendedQualifiers = &h20000

Set SWBemServices = GetObject ("winmgmts:root\cimv2")

Set colPerfClasses = SWBemServices.ExecQuery _
("Select * From Meta_Class " _
& "Where __SuperClass = 'Win32_PerfRawData' " _
& "Or __SuperClass = 'Win32_PerfFormattedData'", _
"WQL", wbemFlagUseAmendedQualifiers)

For Each objPerfClass In colPerfClasses
   WScript.Echo objPerfClass.SystemProperties_ ("__CLASS")
   WScript.Echo objPerfClass.Qualifiers_ ("DisplayName")
      For Each objProperty In objPerfClass.Properties_
         For Each objQualifier In objProperty.Qualifiers_
            If objQualifier.Name = "DisplayName" Then
            WScript.Echo VbTab & objQualifier.Value
            End If
         Next
      Next
   WScript.Echo
Next


-- 
urkec
date: Thu, 3 Apr 2008 08:52:02 -0700   author:   urkec

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us