Win32_PerfRawData_PerfOS_Processor class
The Win32_PerfRawData_PerfOS_Processor raw performance data class provides raw data from performance counters that monitor processor activity.
This class represents the Processor object in System Monitor. The original data source is the PerfOS performance library. The corresponding formatted data class is Win32_PerfFormattedData_PerfOS_Processor. Data is dynamically provided for this class from the performance library object by the WmiPerfInst provider.
Windows Server 2003, Windows XP, and Windows 2000: WMI data for this class is supplied by the Performance Counter Provider.
Beginning with Windows Vista, the mapping between instances of this class and the associated instances of Win32_Processor are complicated by changes to Win32_Processor. To learn more about how those mappings work, see the example in this topic.
The following syntax is simplified from MOF code and shows all inherited properties, including the Frequency and Timestamp properties required for class display in System Monitor. For more information about required property qualifiers, see Property Qualifiers for Raw Performance Counter Classes. For more information about CounterType values, see WMI Performance Counter Types.
Syntax
class Win32_PerfRawData_PerfOS_Processor : Win32_PerfRawData
{
uint64 C1TransitionsPerSec;
uint64 C2TransitionsPerSec;
uint64 C3TransitionsPerSec;
string Caption;
string Description;
uint32 DPCRate;
uint32 DPCsQueuedPerSec;
uint64 Frequency_Object;
uint64 Frequency_PerfTime;
uint64 Frequency_Sys100NS;
uint32 InterruptsPerSec;
string Name;
uint64 PercentC1Time;
uint64 PercentC2Time;
uint64 PercentC3Time;
uint64 PercentDPCTime;
uint64 PercentIdleTime;
uint64 PercentInterruptTime;
uint64 PercentPrivilegedTime;
uint64 PercentProcessorTime;
uint64 PercentUserTime;
uint64 Timestamp_Object;
uint64 Timestamp_PerfTime;
uint64 Timestamp_Sys100NS;
};
Members
The Win32_PerfRawData_PerfOS_Processor class has these types of members:
Properties
The Win32_PerfRawData_PerfOS_Processor class has these properties.
- C1TransitionsPerSec
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("C1 Transitions/sec") , CounterType (272696576) , DefaultScale (0) , PerfDetail (400)
Rate at which the CPU enters the C1 low-power idle state. The CPU enters the C1 state when it is sufficiently idle and exits this state on any interrupt. This property displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
For more information about using uint64 values in scripts, see Scripting in WMI.
- C2TransitionsPerSec
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("C2 Transitions/sec") , CounterType (272696576) , DefaultScale (0) , PerfDetail (400)
Rate at which the CPU enters the C2 low-power idle state. The CPU enters the C2 state when it is sufficiently idle and exits this state on any interrupt. This property displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
For more information about using uint64 values in scripts, see Scripting in WMI.
- C3TransitionsPerSec
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("C3 Transitions/sec") , CounterType (272696576) , DefaultScale (0) , PerfDetail (400)
Rate at which the CPU enters the C3 low-power idle state. The CPU enters the C3 state when it is sufficiently idle and exits the state on any interrupt. This property displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Caption
-
- Data type: string
- Access type: Read-only
Short textual description for the statistic or metric. This property is inherited from CIM_StatisticalInformation.
- Description
-
- Data type: string
- Access type: Read-only
Textual description of the statistic or metric. This property is inherited from CIM_StatisticalInformation.
- DPCRate
-
- Data type: uint32
- Access type: Read-only
- Qualifiers: DisplayName ("DPC Rate") , CounterType (65536) , DefaultScale (0) , PerfDetail (200)
Rate at which deferred procedure calls (DPCs) are added to the processor DPC queue between the timer tics of the processor clock. (DPCs are interrupts that run at a lower priority than standard interrupts. Each processor has its own DPC queue.) This property measures the rate at which DPCs are added to the queue, not the number of DPCs in the queue. This property displays the last observed value only; it is not an average.
- DPCsQueuedPerSec
-
- Data type: uint32
- Access type: Read-only
- Qualifiers: DisplayName ("DPCs Queued/sec") , CounterType (272696320) , DefaultScale (0) , PerfDetail (200)
Overall rate at which deferred procedure calls are added to the processor DPC queue. This property measures the rate at which DPCs are added to the queue, not the number of DPCs in the queue. This property displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
- Frequency_Object
-
- Data type: uint64
- Access type: Read-only
Frequency, in ticks per second, of Timestamp_Object. This property is defined by the provider. This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Frequency_PerfTime
-
- Data type: uint64
- Access type: Read-only
Frequency, in ticks per second, of Timestamp_Perftime. A value could be obtained by calling the Windows function QueryPerformanceCounter. This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Frequency_Sys100NS
-
- Data type: uint64
- Access type: Read-only
Frequency, in ticks per second, of Timestamp_Sys100NS (10000000). This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
- InterruptsPerSec
-
- Data type: uint32
- Access type: Read-only
- Qualifiers: DisplayName ("Interrupts/sec") , CounterType (272696320) , DefaultScale (-2) , PerfDetail (100)
Average number of hardware interrupts that the processor is receiving and servicing in each second. It does not include DPCs, which are counted separately. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, mouse, disk drivers, data communication lines, network interface cards, and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This property displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
- Name
-
Label by which the statistic or metric is known. When sub-classed, the property can be overridden to be a key property. This property is inherited from CIM_StatisticalInformation.
- PercentC1Time
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% C1 Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (400)
Percentage of time that the processor spends in the C1 low-power idle state, which is a subset of the total processor idle time. The C1 low-power state enables the processor to maintain its entire context and quickly return to the running state. Not all systems support the C1 state.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentC2Time
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% C2 Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (400)
Percentage of time that the processor spends in the C-2 low-power idle state, which is a subset of the total processor idle time. The C2 low-power state is a lower power and higher exit latency state than C1. Not all systems support the C2 state.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentC3Time
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% C3 Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (400)
Percentage of time that the processor spends in the C3 low-power idle state, which is a subset of the total processor idle time. When the processor is in the C3 low-power idle state, it is unable to maintain the coherency of its caches. The C3 power state is a lower power and higher exit latency state than C2. Not all systems support the C3 state.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentDPCTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% DPC Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (200)
Percentage of time that the processor spent receiving and servicing deferred procedure calls during the sample interval. This property is a component of PercentPrivilegedTime because DPCs are executed in privileged mode. They are counted separately and are not a component of the interrupt counters. This property displays the average busy time as a percentage of the sample time.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentIdleTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% Idle Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (400)
Percentage of time during the sample interval that the processor was idle.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentInterruptTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% Interrupt Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (200)
Percentage of time that the processor spent receiving and servicing hardware interrupts during the sample interval. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, mouse, disk drivers, data communication lines, network interface cards, and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This property displays the average busy time as a percentage of the sample time.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentPrivilegedTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% Privileged Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (200)
Percentage of non-idle processor time spent in privileged mode. Privileged mode is a processing mode designed for operating system components and hardware-manipulating drivers. It allows direct access to hardware and all memory. The alternative, user mode, is a restricted processing mode designed for applications, environment subsystems, and integral subsystems. The operating system switches application threads to privileged mode to access operating system services. This property includes time servicing interrupts and DPCs. A high rate of privileged time might be attributable to a large number of interrupts generated by a failing device. This property displays the average busy time as a percentage of the sample time.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentProcessorTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% Processor Time") , PerfDefault, CounterType (558957824) , DefaultScale (0) , PerfDetail (100)
Percentage of time that the processor is executing a non-idle thread. This property was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the idle process in each sample interval and subtracting that value from 100%. Each processor has an idle thread which consumes cycles when no other threads are ready to run. It can be viewed as the percentage of the sample interval spent doing useful work. This property displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracing that value from 100%.
For more information about using uint64 values in scripts, see Scripting in WMI.
- PercentUserTime
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: DisplayName ("% User Time") , CounterType (542180608) , DefaultScale (0) , PerfDetail (200)
Percentage of non-idle processor time spent in user mode. User mode is a restricted processing mode designed for applications, environment subsystems, and integral subsystems. The alternative, privileged mode, is designed for operating system components and allows direct access to hardware and all memory. The operating system switches application threads to privileged mode to access operating system services. This property displays the average busy time as a percentage of the sample time.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Timestamp_Object
-
- Data type: uint64
- Access type: Read-only
Object-defined timestamp, defined by the provider. This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Timestamp_PerfTime
-
- Data type: uint64
- Access type: Read-only
High Performance counter timestamp. A value could be obtained by calling the Windows function QueryPerformanceCounter. This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
- Timestamp_Sys100NS
-
- Data type: uint64
- Access type: Read-only
Timestamp value in 100 nanosecond units. This property is inherited from Win32_Perf.
For more information about using uint64 values in scripts, see Scripting in WMI.
Remarks
All classes derived from Win32_Perf are designed to be used with a refresher object. For more information about how to create and use a refresher object in C++, see Accessing Performance Data in C++. For more information about how to create and use a refresher object using scripts, see Refreshing WMI Data in Scripts.
The performance class and property qualifiers determine how to interpret the class data. For more information, see Class Qualifiers for Performance Counter Classes and Property Qualifiers for Performance Counter Classes.
Beginning with Windows Vista, changes to the Win32_Processor class affected the relationship between instances of that class and the corresponding instances of the Win32_PerfRawData_PerfOS_Processor class. The following script demonstrates how to display performance information for processors with one or more cores and one or more hyperthreading modules by mapping the information returned by instances of Win32_Processor to the corresponding information returned by Win32_PerfRawData_PerfOS_Processor.
To understand how instances of Win32_PerfRawData_PerfOS_Processor map to the elements of various CPU architectures, first determine the smallest execution element of the architecture. In a multithreaded CPU, this will be the hyperthreading module. In a single-threaded, multi-core CPU, this will be the core. Next, order the full set of these logical processors by performing a nested looping through the elements, with the smallest element in the innermost loop. For example, the following table illustrates how to order the elements for a two-socket computer with dual-core processors and hyper-threading enabled.
| Logical processor | Corresponding instance |
|---|---|
| Socket1, Core1, HT Module 1 | Win32_PerfRawData_PerfOS_Processor.Name=0 |
| Socket1, Core1, HT Module 2 | Win32_PerfRawData_PerfOS_Processor.Name=1 |
| Socket1, Core2, HT Module 1 | Win32_PerfRawData_PerfOS_Processor.Name=2 |
| Socket1, Core2, HT Module 2 | Win32_PerfRawData_PerfOS_Processor.Name=3 |
| Socket2, Core1, HT Module 1 | Win32_PerfRawData_PerfOS_Processor.Name=4 |
| Socket2, Core1, HT Module 2 | Win32_PerfRawData_PerfOS_Processor.Name=5 |
| Socket2, Core2, HT Module 1 | Win32_PerfRawData_PerfOS_Processor.Name=6 |
| Socket2, Core2, HT Module 2 | Win32_PerfRawData_PerfOS_Processor.Name=7 |
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
In the first part of the script, values of the Win32_Processor class NumberOfLogicalProcessors and NumberOfCores properties are used to determine the architecture of the processor. Within the later Select Case section of the script, the mappings between instances of Win32_Processor and Win32_PerfRawData_PerfOS_Processor are handled for each of the architectures.
Set objWMIService = GetObject("winmgmts:") Set colProcessors = objWMIService.ExecQuery("SELECT * FROM Win32_Processor") iSocket = 1 For Each objProcessor In colProcessors iNumLogProcs = objProcessor.NumberOfLogicalProcessors iNumCores = objProcessor.NumberOfCores If objProcessor.NumberOfCores > 1 Then If iNumLogProcs > iNumCores Then strArchitecture = "MULTICOREHT" Else strArchitecture = "MULTICORE" End If Else If iNumLogProcs > iNumCores Then strArchitecture = "SINGLECOREHT" Else strArchitecture = "SINGLECORE" End If End If Set colPerf = objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_PerfOS_Processor") iHTModule = 1 iCore = 1 iTotHTModules = colPerf.Count-1 / iNumCores For Each objPerf in colPerf If objPerf.Name <> "_Total" Then Select Case strArchitecture Case "MULTICOREHT" WScript.Echo "Socket " & iSocket & " Core " & iCore & " HT Module " & iHTModule WScript.Echo vbTab & "Interrupts per second: " & objPerf.InterruptsPersec WScript.Echo vbTab & "DPCs Queued per second: " & objPerf.DPCsQueuedPerSec iHTModule = iHTModule + 1 If iHTModule > iTotHTModules Then iHTModule = 1 iCore = iCore + 1 End If Case "SINGLECOREHT" WScript.Echo "Socket " & iSocket & " Core 1 HT Module " & iHTModule WScript.Echo vbTab & "Interrupts per second: " & objPerf.InterruptsPersec WScript.Echo vbTab & "DPCs Queued per second: " & objPerf.DPCsQueuedPerSec iHTModule = iHTModule + 1 Case "MULTICORE" WScript.Echo "Socket " & iSocket & " Core " & iCore WScript.Echo vbTab & "Interrupts per second: " & objPerf.InterruptsPersec WScript.Echo vbTab & "DPCs Queued per second: " & objPerf.DPCsQueuedPerSec iCore = iCore + 1 Case "SINGLECORE" WScript.Echo "Socket " & iSocket & " Core 1" WScript.Echo vbTab & "Interrupts per second: " & objPerf.InterruptsPersec WScript.Echo vbTab & "DPCs Queued per second: " & objPerf.DPCsQueuedPerSec End Select End If Next iSocket = iSocket + 1 Next
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
DLL |
|
See also
- Performance Counter Classes
- Accessing WMI Preinstalled Performance Classes
- WMI Tasks: Performance Monitoring
- Accessing Performance Data in Script
Send comments about this topic to Microsoft
Build date: 11/19/2012