Condividi tramite


Win32_PerfRawData_PerfProc_Thread class

The Win32_PerfRawData_PerfProc_Thread raw performance data class provides raw data from performance counters that monitor aspects of thread behavior. A thread is the basic object that executes instructions on a processor. All running processes have at least one thread.

This class represents the Thread object in System Monitor. The WMI source of its data is the high-performance Performance Counter Provider. The original data source is the PerfProc performance library. The corresponding formatted data class is Win32_PerfFormattedData_PerfProc_Thread.

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 Performance Counter Classes. For more information about CounterType values, see WMI Performance Counter Types.

Syntax

class Win32_PerfRawData_PerfProc_Thread : Win32_PerfRawData
{
  string Caption;
  uint32 ContextSwitchesPerSec;
  string Description;
  uint64 ElapsedTime;
  uint64 Frequency_Object;
  uint64 Frequency_PerfTime;
  uint64 Frequency_Sys100NS;
  uint32 IDProcess;
  uint32 IDThread;
  string Name;
  uint64 PercentPrivilegedTime;
  uint64 PercentProcessorTime;
  uint64 PercentUserTime;
  uint32 PriorityBase;
  uint32 PriorityCurrent;
  uint32 StartAddress;
  uint32 ThreadState;
  uint32 ThreadWaitReason;
  uint64 Timestamp_Object;
  uint64 Timestamp_PerfTime;
  uint64 Timestamp_Sys100NS;
};

Members

The Win32_PerfRawData_PerfProc_Thread class has these types of members:

  • Properties

Properties

The Win32_PerfRawData_PerfProc_Thread class has these properties.

Caption

Data type: string

Access type: Read-only

Short textual description for the statistic or metric. This property is inherited from CIM_StatisticalInformation.

ContextSwitchesPerSec

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Context Switches/sec") , CounterType (272696320) , DefaultScale (-2) , PerfDetail (200)

Rate of switches from one thread to another. Thread switches can occur either inside of a single process or across processes. A thread switch can be caused either by one thread requesting data from another thread or because a higher priority thread is ready to run. The operating system uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by the operating system on behalf of an application will appear in other subsystem processes in addition to the privileged time in the application. Switching to the subsystem process causes one Context Switch in the application thread. Switching back causes another Context Switch in the subsystem thread.

Description

Data type: string

Access type: Read-only

Textual description of the statistic or metric. This property is inherited from CIM_StatisticalInformation.

ElapsedTime

Data type: uint64

Access type: Read-only

Qualifiers: DisplayName ("Elapsed Time") , CounterType (807666944) , DefaultScale (-4) , PerfDetail (200)

Total elapsed time, in seconds, this thread has been running.

For more information about using uint64 values in scripts, see Scripting in WMI.

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.

IDProcess

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("ID Process") , CounterType (65536) , DefaultScale (0) , PerfDetail (400)

Unique identifier of this process. Values for this property are reused, so they only identify a process for the lifetime of that process.

IDThread

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("ID Thread") , CounterType (65536) , DefaultScale (0) , PerfDetail (400)

Unique identifier of this thread. Values for this property are reused, so they only identify a thread for the lifetime of that thread.

Name

Data type: string

Access type: Read-only

Qualifiers: Key, MaxLen (256)

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.

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 deferred procedure calls (DPC). A high rate of privileged time may occur because a failing device generates a large number of interrupts. 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 (542180608) , 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%. The Idle process consumes cycles when no other threads in the processor 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 subtracting 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 (65536) , 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.

PriorityBase

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Priority Base") , CounterType (65536) , DefaultScale (0) , PerfDetail (200)

Current base priority of this thread. The system can raise the dynamic priority of the thread above the base priority if the thread is handling user input, or lower it toward the base priority if the thread starts executing a CPU-intensive computation.

PriorityCurrent

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Priority Current") , CounterType (65536) , DefaultScale (0) , PerfDetail (200)

Current dynamic priority of this thread. The system can raise the dynamic priority of the thread above the base priority if the thread is handling user input, or lower it toward the base priority if the thread starts executing a CPU-intensive computation.

StartAddress

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Start Address") , CounterType (65536) , DefaultScale (0) , PerfDetail (400)

Starting virtual address for this thread.

ThreadState

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Thread State") , CounterType (65536) , DefaultScale (0) , PerfDetail (400)

Current state of the thread.

Value Meaning
0

Initialized

Thread is started.

1

Ready

Waiting for a processor because none are free.

2

Running

Using a processor.

3

Standby

About to use a processor.

4

Terminated

Thread has been ended.

5

Wait

Not ready for a processor because the thread is waiting for a peripheral operation to complete or a resource to become free.

6

Transition

Waiting for a resource to execute, such as waiting for the thread's execution stack to be paged in from disk.

7

Unknown

State of the thread cannot be determined by the system.

 

ThreadWaitReason

Data type: uint32

Access type: Read-only

Qualifiers: DisplayName ("Thread Wait Reason") , CounterType (65536) , DefaultScale (0) , PerfDetail (400)

This property is only applicable when the thread is in the Wait state. For more information, see the ThreadState property.

Value Meaning
0

Executive

1

Free page

2

Page In

3

Pool allocation

4

Execution delay

5

Suspended condition

6

User request

7

Executive

8

Free page

9

Page In

10

Pool allocation

11

Execution delay

12

Suspended condition

13

User request

14

Event Pair High. Event pairs are used to communicate with protected subsystems.

15

Event Pair Low. Event pairs are used to communicate with protected subsystems.

16

LPC Receive

17

LPC Reply

18

Virtual Memory

10

Page Out

20 and higher

not assigned

 

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.

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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

DLL

WmiPerfInst.dll; WbemPerf.dll on Windows Server 2003 and Windows XP

See also

Performance Counter Classes

Accessing WMI Preinstalled Performance Classes

WMI Tasks: Performance Monitoring

Accessing Performance Data in Script