Recipe 6.8. Viewing the Performance Statistics of a ProcessProblemYou want to view the memory, I/O, and CPU statistics of a process. This is useful if you want to examine the resources a process is using. If you find that you are running low on memory on a particular system, it can often be attributed to a single process that has consumed a large amount. If you can terminate that process, the system should go back to a stable state. SolutionUsing a graphical user interface
This information can also be viewed using Windows Task Manager (taskmgr.exe). After starting taskmgr.exe, click on the Processes tab. Select View Using a command-line interface The following command displays all of the performance metrics for a process: Replace <ProcessName> with the name of the process without its extension. For example: If you need to get serious about analyzing performance statistics for one or more processes, you should consider using Performance Monitor (perfmon.exe). With the Process performance object (click the little + icon in the System Monitor and select Process under Performance object), you can graph a variety of metrics for individual processes or all of them together using the _Total instance. Even if you don't want to use Performance Monitor to monitor processes, the tool provides some good information about process metrics, such as Working Set. Click the Explain button when you view the Process performance object, which will cause another dialog to appear that contains additional information about what each counter means. These counters are mostly the same ones as you'll find in Task Manager, pslist, and Win32_Process. |