Microsoft® Windows® 2000 Scripting Guide
Processes underlie almost everything that happens on a computer. In fact, the root cause of most computer problems can be traced to processes; for example, too many processes might be running on a computer (and contending for a finite set of resources), or a single process might be using more than its share of resources.
These factors make it important to keep a close watch on the processes running on a computer. Process monitoring, the main activity in process management, allows you to determine what a computer actually does, what applications the computer runs, and how those applications are affected by changes in the computing environment.
Process monitoring helps you:
Optimize your system to account for peak demands.
For example, you can ensure that a backup service runs only at night, when the high network utilization does not adversely affect users.
Identify and react to potential problems.
Monitoring memory use can help you identify memory leaks and enable you to take action before an application can monopolize system resources and bring the computer to a halt.
Ensure that computers are being used properly.
For example, by monitoring the processes running on a computer, you know whether an administrator has started a resource-intensive application on a Domain Name System (DNS) server.
In addition to monitoring processes, process management also includes such tasks as creating processes, terminating processes, and configuring process priority.
Processes can be managed by using the graphical user utility Windows Task Manager. However, Task Manager returns information only about the processes running on the local computer and cannot be used as part of an automated management strategy. Fortunately, the Windows Management Instrumentation (WMI) Win32_Process class can retrieve much of the same information and carry out many of the same tasks as Task Manager. A comparison of selected Win32_Process classes and methods and the Windows Task Manager is shown in Figure 14.1.
Figure 14.1 Win32_Process and Windows Task Manager