Processor Counters

The System, Processor, Process, and Thread objects contain counters that provide useful information about the work of your processor. Examine the following counters for details about computer processes.

Table 7.1 Processor Counters

Object

Counter

Description

System

Context Switches/sec

The average rate per second at which context switches among threads on the computer. High activity rates can result from inefficient hardware or poorly designed applications. Compare these counters with Processor\% Privileged Time, Processor\% User Time, and Processor\% Interrupt Time. See "Monitoring Interrupts" and "Monitoring Context Switches" later in this chapter.

Processor

Interrupts/sec

The average rate per second at which the processor handles interrupts from applications or hardware devices. High activity rates can indicate hardware problems. Compare these counters with Processor\% Privileged Time, Processor\% User Time, and Processor\% Interrupt Time. See "Monitoring Interrupts" and "Monitoring Context Switches" later in this chapter.

System

Processor Queue Length

An instantaneous count of threads that are in the processor queue. See "Observing Processor Queue Length" later in this chapter.

Processor

% Processor Time

The percentage of time the processor was busy during the sampling interval. This counter is equivalent to Task Manager's CPU Usage counter. See "Examining the Processor Time Counter" later in this chapter.
For the value of total processor utilization systemwide, use the Processor(_Total)\% Processor Time counter.

Process

% Privileged Time

The percentage of time a process was running in privileged mode See "Processes in a Bottleneck" later in this chapter.

Process

% Processor Time

The percentage of time the processor was busy servicing a specific process.

Process

% User Time

The percentage of time a process was running in user mode.

Process

Priority Base

Windows 2000 schedules threads of a process to run according to their priority. Threads inherit base priority from their parent processes. The base priority level of the process can range from lowest to highest: Idle, Normal, High, or Real Time.

Thread

Thread State

A numeric value indicating the execution state of the thread. The system numbers threads from 0 through 5; the states seen most often are 1 for ready, 2 for running, and 5 for waiting. Threads with a state of 1 are in the processor queue.

Thread

Priority Base

The base priority level (from 1 through 31) for the thread based on the priority class of the process. Windows 2000 schedules threads of a process to run according to their priority. Threads inherit base priority from their parent processes.

Thread

Priority Current

The current priority level of a thread. This level can vary during operation.

Thread

Context Switches/sec

The average rate per second at which the processor switches context among threads. A high rate can indicate that many threads are contending for processor time. See "Threads in a Bottleneck" later in this chapter.

Thread

% Privileged Time

The percentage of time a thread was running in privileged mode.

Thread

% User Time

The percentage of time a thread was running in user mode.

note-icon

Note

Because System Monitor samples processor time, the values for processor time counters reported by the Processor, Process, and Thread objects might underestimate or overestimate activity on your system that occurs before or after collection of the sample.

In addition to the preceding list of objects and counters, the Job Object and Job Object Details objects provide information about processor usage. These performance objects are installed by default for monitoring job object performance. The job object makes it possible for developers to manage groups of processes by their processor usage and other factors. For example, job objects make it possible for applications to restrict the amount of processor time a process consumes; this is called process throttling. Process throttling is useful in Web-based administration applications for limiting the amount of processor capacity a site uses over a defined interval, thus avoiding bottlenecks and freeing processor capacity for other tasks. You might also use the job object to manage sharing of CPU time among groups of jobs. In addition to supporting process throttling, job objects help developers control the active number of processes, process identifiers (IDs), priority classes, and processor affinity. For information about creating applications using the job object, see the Platform Software Development Kit (SDK) link on the Web Resources page at https://windows.microsoft.com/windows2000/reskit/webresources . For a discussion of application support and job objects, see Getting Started in Windows 2000 Help.