18 May 2013

Resource Monitor in Windows 7 and 8

As a Windows user, knowing how to maintain the operating system’s problems is a big advantage. When your system crashes, unexpected shutdowns or an application stops responding, what would be your steps to find the source of the problem? Fortunately Microsoft provided some great tools for keeping track of your system performance and health in the Windows 7 and 8. I have written some articles about these tools before such as "How to use WindowsEvent viewer", "Windows Performance Monitor" and "Performance Monitor SystemHealth Report". Today I intend to introduce another tool in the Windows 7 or 8 that you can use to find information about your system resources (hardware and software) in real time. This system tool is called "Windows Resource Monitor". By using the Windows Resource Monitor, you are able to monitor specific service or process, troubleshoot a hung program, and even start, stop and resume a service. Let see how to work with Resource Monitor:

First of all to open the Windows Resource Monitor go to Start>All Programs>Accessories>System Tools>Resource Monitor.

Or type "resmon" in the Run dialog box and hit the Enter key. To make Resource Monitor available in the Windows 8’s Start screen, from the Charm bar (Win + C) go to the Settings>Tiles>Show Administrative Tools.

When the Resource Monitor opened, you’ll see a window like the figure below. Resource Monitor contains 5 tabs: Overview, CPU, Memory, Disk and Network. On the Overview tab you can check the basic system resource usage information and the other four tabs as their name suggested, display the information about CPU, Memory, Disk and Network usage information.

Tables and Chart Panes

Each tab on the Resource Monitor window contains multiple tables showing the detailed information about the featured resource. For example the Overview tab includes CPU, Disk, Network and Memory tables. To expand and collapse any table, just click on the arrow icon on the right side of the title. Each table contains some columns (like Description and Status). To hide and add any column to a specific table, right-click on the column title and choose Hide column or Select column then add a new column from the list. To know more about each column, simply hover the mouse on the column’s label to see more information.

Microsoft also has provided Chart Panes for each tab on the right side of the window. These charts display graphical information about the current tab’s resources. To change the size of the graphs, click on the View button and then select your desired size. You can also hide the Chart Pane by clicking on the arrow icon at the top.

If you have more than one processor, to see graphs about specific processor, when the CPU tab is opened, from the menu select Monitor and then Select Processors. 

Now that you are familiar with the layout of the Resource Monitor window, let see how we can use this tool to identify Resource Consumers.
Before I start I should tell you how to start/stop and filter the data. To pause the monitoring of current data, from the menu go to Monitor>Stop Monitoring. To resume the Monitoring again you can select Start Monitoring with the same menu. 

For filtering the detailed data in a table, select one or more processes or services in the key table (the top most tables in each tab). To undo the filtering, clear the check box or boxes. To clear all check boxes together, clear the check box next to the image. When you filter the result, tables other than the key table will only show information about the selected service. Filtered results can be recognized by an orange bar below the title bar of any table. For example currently in my system the Firefox and Photoshop are opened and I want the see the detailed information about these two applications. I have selected them for the filtering results. Check the figure below:

Find the process with the maximum CPU usage

Go the CPU tab and on the Processes table, click on the CPU column label. The first process in the list is the process/service with highest current CPU usage.

Find addresses of connected processes to the network
Go to the Network tab and select the process that you want to identify its network connection. Expand the TCP Connections table and then check the Remote Address and Remote Port columns to see the addresses and ports that the process/s connected to.

Find the available space on storage devices

Go to the Disk tab and expand the Storage table. Here you can check the Total Space and Available Space (in MB) of your system physical disk.

Find the available memory space for the programs

Go to the Memory tab and view the available memory (in MB) for the programs in the Physical Memory table. This amount is the total of standby and free memory together (include zero page memory).

Control processes and services

To end a process in the key table (the top most tables) of any tab, in the Image column (the first column from the right), you have to right-click on the name of the process and then select End Process.
To suspend a process, again in any key table, right-click on the process name and then select Suspend Process.
To resume a suspended process, in any key table, right-click on the process name and then select Resume Process.

To start, stop and restart a service, go to the CPU tab, expand the Services table and then right-click on the Name of the service/s. From the menu, select Stop Service, Start Service or Restart Service.

How to analyze a process and troubleshoot unresponsive programs

The hung or unresponsive programs will appear as red sings or entry in the Overview tab and in the CPU table. Also you can find them in the Processes table of the CPU tab. The cause of an unresponsive application can be due to unavailability of system resources. It means the application must wait till other process to be finished before they can continue. Windows Resource Monitor allows you to Analyze Wait Chain of a process. After the processes that prevent your desired program to respond, you can terminate them by ending the processes.

Go to the key table on any tab and then right-click on the process name. From the menu select Analyze Wait Chain. If the process is not waiting for any other process to finish and working normally, then nothing will be displayed. Otherwise a wait chain tree will be displayed that of the tree you can choose one or more processes by selecting the check boxes next to each process and then End process.

View Handles and Modules

Before I started with how to use the Resource Monitor to see which handles and modules are associated with a process, you should know what a handle is and what is a module?

A handle is a pointer (memory location) for referring to a particular system resource like files, registry keys or directories. In the Windows operating system, an application cannot directly access system resources and it must use a handle that has ability to change the system resources. A handle has an entry that contains the locations (addresses) of the system resources.

A module is a helper file or program (block of codes or instructions) that includes dynamic link library (DLL) files. A DLL is a combination of programs that needed for executing an EXE file.

To find all handles and modules used by a running process or program, go to the CPU tab and select the process that you want to see its associated handles and modules. Expand the Associated Handles and Associated Modules tables and review the results.

To see a specific handle currently is using by which processes or programs, in the title bar of the Associated Handles table, select the search box and enter the name of the handle. Then click the search button.

I hope this article was helpful for you to use the Windows Resource Monitor as a tool for troubleshooting the applications’ problems, see how processes and services use the system resources and know more about the Windows operating system architecture.