Simplicity at its best

Funny how the simplest things can sometimes get me the most excited. In Windows NT 4.0, one seemingly small feature has my attention because it can make a big difference in making NT easy to use and administer.

If you've used NT 4.0, you probably like the new user interface, improved performance, or other obvious features. I like those features, too, but the new feature that most caught my eye is the vastly improved Task Manager. Task Manager can help you manage NT applications, processes, and performance. Understanding how to use this tool will help you keep NT humming along smoothly.

Running Task Manager
You probably won't find Task Manager on any NT 4.0 menus, so I'll start by describing a few ways to run it. One place you'll see a reference to Task Manager is in the NT Security dialog box. Press Ctrl+Alt+Del to bring up the NT Security dialog box, and click Task Manager. You can use Task Manager to shut down applications that aren't responding. Microsoft put Task Manager on the NT Security dialog box because the almost natural response to an application that's not responding is the three-finger salute.

To start Task Manager another way, right-click on the taskbar. Task Manager is an option on the pop-up menu.

The name of the Task Manager program is taskmgr.exe, so you can use the Run option from the Start menu to bring up the program. You can also, of course, create a shortcut to the program on the desktop.

When you start Task Manager, you'll see a window similar to Screen 1, and you'll notice that Task Manager adds a graphical CPU utilization monitor to the taskbar notification area.

Let me show you how to use Task Manager to manage applications.

Managing Applications
Task Manager has three tabs: Applications, Processes, and Performance. In Screen 1, I have three active applications. One of them, Session A - \[24 * 80\] (a communications application), has crashed. The application's status is Not Responding. Usually, the application's status is Running.

To end this application, I can select the application and click the End Task button at the bottom of the frame. Another dialog box will usually pop up to say that the application didn't respond to the End Task request. This dialog box asks whether I want to give the application another five seconds to respond, end the application, or cancel the request. Unless you have a reason to think that the application will end in another five seconds, click End Application to end the task.

From this dialog box, you can also access the Switch To and New Task buttons. New Task brings up a dialog box from which you can start a new application. You can also start a new application from the menu bar or right-click in the frame's open area to get a pop-up menu with an option to start an application.

From here, you can do other things. If you double-click an application in this frame, the system will switch to that application. Or you can right-click an application to see the menu in Screen 2. From this pop-up menu, you can control the application in various ways. You can switch to the task, bring the task to the front, minimize or maximize the task, end the task, or go to the process associated with the task. In the example in Screen 2, the Cascade, Tile Horizontally, and Tile Vertically menu items are unavailable. Availability of these options depends on which other applications are open and what their state is. For example, if all the applications are minimized, you can't access the Minimize menu item.

Managing Processes
Another class of active programs that run under NT is processes. An application has one or more processes, but not all processes have an application.

If you click the Processes tab in the Task Manager dialog box, you'll see a window similar to Screen 3. This screen shows a list of the active processes and some variable performance information about them. In this case, one of the processes is highlighted. That's because from the menu shown in Screen 2, I selected the Go To Process menu item. Choosing this menu option shows which process is associated with an application.

You can end a process with the End Process button at the bottom of the frame. However, be careful when doing so. Some of the processes shown, such as services.exe, are necessary for NT to operate. Other processes, such as rpcss.exe, support networking functions. Before you end a process, try to figure out what might be causing the problem with the process. Also look for other ways to end the process, such as ending an application or a service through the Control Panel.

From the Processes tab, you can also change the priority of processes by right-clicking an application and selecting Set Priority. You'll see a window similar to Screen 4. The current priority appears with a dot next to one of the listed priorities. To change the priority, simply select the priority you want.

Usually, you won't need to change the priority of processes. But suppose you have a communications process that can't complete because the process isn't getting enough CPU to keep the communications link going. In this case, you can temporarily change the process's priority to High to get the communications task to complete successfully.

You can alter the information in the Processes view frame by selecting View, Select Columns. That menu item brings up a dialog box similar to Screen 5. From this dialog box, you select what performance information to show for each process in Screen 4. You can size each field in Screen 4 by dragging the boundaries of the column headings, and you can click the column heading for a field to reorder the list. If you want to see the processes listed in the order in which they're using the CPU, click the CPU column's heading. By clicking the heading again, you can list the processes in descending CPU utilization order. This screen updates the performance data at intervals that you set from the Update Speed menu item under View.

Monitoring Performance
Clicking the Task Manager's Performance tab, brings up a window similar to Screen 6. This screen shows a great deal of information about your system's performance. Starting at the top, you see two graphical depictions of CPU utilization. The bar scale on the left shows current CPU utilization. The graph on the right shows CPU utilization history; the history depends on your settings for the update speed rate and the size of the Task Manager window.

The next section shows memory utilization. Similar to the CPU utilization information, the left side shows current memory utilization, and the graph on the right side shows historical memory utilization. From the CPU graph, you might wonder, "What the heck was he doing to use so much CPU?"

In this case, I know the answer: I'm using Microsoft Word. I don't type so fast that the application has a difficult time keeping up with me; automatic spelling correction and automatic text replacement are using most of that CPU time. The application constantly watches what I'm typing and keeps busy fixing all my typos.

The Processes tab, shown in Screen 4, confirms my suspicion. The CPU Time column shows the total amount of CPU time that each process has used. If I rank that data in descending order, I see that the CPU time winword.exe is using is second on the list, after idle time on my system. The System Idle Process is the amount of time my system has spent doing nothing.

Back to Screen 6: The four frames at the bottom of the window detail how my system is using memory. You can see how many handles, threads, and processes exist. You can also see the availability and use of physical memory, kernel memory, and commit charge memory in kilobytes.

The Physical Memory frame displays the total physical memory installed and configured in the system. In my system, I have 32MB: the system has about 10MB available and is using about 8MB for file caching.

Kernel memory is memory the operating system is using. In this frame, the total is just a bit more than 8MB, also broken down into paged and nonpaged memory. Paged memory is memory the system can temporarily swap to disk if the operating system needs that memory.

Finally, the Commit Charge frame shows how much memory is allocated to application and system programs. This frame shows the total memory currently in use, the maximum available, and the peak usage since Task Manager started. The values in the Memory Usage section of the Task Manager status bar at the bottom of the screen correspond with the values for the commit charge memory currently in use and for the memory limit.

A Powerful Tool
The new Task Manager lets you manage NT tasks and processes and basic system performance. However, Task Manager is by no means a replacement for Performance Monitor (Perfmon). Perfmon gives you much more detailed information and can show performance information for different subsystems. (For more information on Perfmon's capabilities, see "The Windows NT Performance Monitor," page 155. So, if Task Manager spots a performance problem, use Perfmon to dig further and figure out what's going on. The new Task Manager is a hot new tool in an administrator's arsenal.