1. | Click Programs in the Start menu and choose Performance Monitor from the Administrative Tools group. The Performance Monitor main window appears on-screen (refer to Figure 12.4). |
2. | Pull down the View menu. You’ll see four options, as follows: |
| |
The setup is similar for each of these view formats. All use some form of the Add to Chart dialog box (refer to Exercise 12.1). All have options that are configured through the first command at the top of the Options menu. (The first command at the top of the Options menu changes its name depending on the active view. It was the Chart option in Exercise 12.1.) | |
3a. | Click the Alert option in the View menu. |
3b. | Click the plus sign in the toolbar or choose Add to Alert from the Edit menu. The Add to Alert dialog box (see Figure 12.8) is similar to the Add to Chart dialog box in Figure 12.5 except for two additional items at the bottom of the screen. The Alert If box enables you to type in a threshold for the counter. The Over/Under radio buttons specify whether you want to receive an alert if the counter value is over or under the threshold value. The Run Program on Alert box lets you specify a command line that will execute if the counter value reaches the threshold you specify in the Alert If box. You can ask Performance Monitor to send a message to your beeper, to send you an e-mail message, or to notify your paging service. Don’t specify a batch file in the Run Program on Alert box. Performance Monitor uses Unicode format, which can confuse the command-prompt interpreter. (The < and > symbols, which are used in Unicode format, are interpreted as a redirection of input or output.) |
3c. | The default object in the Add to Alert dialog box should be the Processor object. The default counter should be %Processor Time. Enter the value 5% in the Alert If box and make sure the Alert If radio button is set to Over. In the Run Program on Alert box, type SOL. Set the Run Program on Alert radio button to First Time. This configuration tells Performance Monitor to execute Windows NT’s Solitaire program when the %Processor Time exceeds 5%. If the Run Program on Alert radio button is not set to First Time, Performance Monitor will execute a new instance of Solitaire every time the %Processor Time exceeds 5%, which happens every time it executes a new instance of Solitaire. You’ll probably have to close Performance Monitor using the X button or reboot to stop the incessant shuffling and dealing. |
3d. | Click the Add button and then click the Done button. The Alert Legend at the bottom of the Alert window describes the active alert parameters. The Alert Log shows every instance of an alert (see Figure 12.9). |
3e. | Make some changes to your desktop. (Hide or reveal the task bar, change the size of the Performance Monitor window—anything that will cause a 5% utilization of the processor.) The Solitaire program should miraculously appear on your screen. In a real alert situation, Performance Monitor would execute an alert application instead of starting a card game. |
3f. | Pull down the Edit menu and select Delete Alert. |
4a. | Pull down the View menu and select Log. Performance Monitor’s Log view saves performance data to a log file rather than displaying it on the screen. |
4b. | Pull down the Edit menu and select Add to Log. Notice that only the objects appear in the Add to Log dialog box. The counters and instances boxes don’t appear because Performance Monitor automatically logs all counters and all instances of the object to the log file. Select the Memory Object and click Add. If you want, you can select another object, such as the Paging File object, and click Add again. When you are finished adding objects, click Done. |
4c. | Pull down the Options menu and select Log. The Log Options dialog box appears on your screen (see Figure 12.10). The Log Options dialog box enables you to designate a log file that Performance Monitor will use to log the data. In the File name box, enter the name exer2. You also can specify an update interval. The update interval is the interval at which Performance Monitor records performance data to the log. The Manual Update radio button specifies that the file won’t be updated unless you press Ctrl+U or select Update Now from the Options menu. Click the Start Log button to start saving data to the log. Wait a few minutes and then return to the Log Options dialog box and click the Stop Log button. |
4d. | Pull down the View menu and switch to Chart view. |
4e. | Pull down the Options menu and select Data From. The Data From dialog box enables you to specify a source for the performance data that appears in the Chart. Note that the default source is Current Activity. (That is why the chart you created in Exercise 12.1 took its data from current system activity.) The alternative to the Current Activity option is to use data from a log file. Click the Log File radio button. Click the ellipsis button to the right of the log file window and select the exer2 file you created in step 4.c. Click OK. |
4f. | Pull down the Edit menu and click Add to Chart. Click the down arrow to the right of the Object menu. Notice that your only object choices are the Memory object and any other objects you selected in step 4.b. Select the Memory object. Browse through the counter list and select Pages/sec. Click the Add button. Select any other memory counters you want to display and click the Add button. Click Done. |
4g. | The log file’s record of the counters you selected in 4.f appears in the chart in the Performance Monitor’s main window. Notice that, unlike the chart you created in Exercise 12.1, this chart does not continuously sweep out new data. That is because this chart represents static data from a previous, finite monitoring session. |
4h. | Pull down the Edit menu and select Time Window. The Time Window enables you to focus on a particular time interval within the log file (see Figure 12.11). In this example (because you only collected data for a few minutes), the Time Window may seem unnecessary. If you collected data for a longer period, however, and you want to zero in on a particular event, the Time Window can be very useful. Set the beginning and end points of your time window by adjusting the gray start and stop sliders on the Time Window slide bar. The Bookmark section at the bottom of the dialog box enables you to specify a log file bookmark as a start or stop point. (You can create a bookmark by selecting the Bookmark option from the Options menu while you are collecting data to the log file or by clicking the book in the Performance Monitor tool bar.) Click OK to view the data for the time interval. |
5a. | Pull down the View menu and switch to Report view. Pull down the Options menu and select Data From. Switch the Data From setting back to Current Activity. Report view displays the performance data in a report rather than in a graphics format. |
5b. | Select Add to Report from the Edit menu. Select the processor object and choose the %Processor Time, %Interrupt Time, and Interrupts/sec counters. (Hold down the Ctrl key to select all three and then click Add. Select the PhysicalDisk object and choose the %Disk Time, Avg. Disk Queue Length, and Current Disk Queue Length counters. Click the Add button. Select the Memory object and choose the Pages/sec, Page Faults/sec, and Available Bytes counters. Click the Add button. Click Done. |
5c. | Examine the main report window. Performance Monitor displays a report of the performance data you specified in a hierarchical format, with counters listed under the appropriate object. |