In this article, we'll show you how to set up a Performance Monitor alert that will notify you if one of these thresholds is crossed. We'll also show you how to monitor a remote system and set an alert for it.
The Performance Monitor utility
Because each system is unique, there are no set rules on how to monitor your system's resources. Learning to know just what to look for takes time and practice. Performance Monitor tracks information about your system through the use of Objects and Counters. Objects are the components of your system, such as the processor, physical disk, and memory. Counters are the statistics that you can track for each object. There are more than 350 Counters that you can use. An example is % Processor Time. This counter measures the percentage of time the processor is doing useful work. Each object has its own unique set of counters.
Using these counters, you can set thresholds of acceptable performance. For example, you could decide that your processor % Processor Time shouldn't regularly exceed 80 percent. By configuring an alert, you could force Performance Monitor to notify you when it did.
The alert view
To create an alert, you first must run the Performance Monitor program. You'll find it in the Administrative Tools menu. When it first opens, Performance Monitor will be in Chart view. This view is used to track your system's counters in real time. To go to the Alert view, select View | Alert from the menu bar, and Performance Monitor will look like Figure A.
Figure A: The Performance Monitor Alert view allows you to
monitor your system's resources.
The next thing you'll want to do is set the options for your alerts. You do this by selecting Options | Alert, or by pressing [Ctrl]O. This displays the Alert Options dialog box, as shown in Figure B. Since we want Performance Monitor to notify us by sending a network message, check the Send Network Message check box and enter the name of your computer. Click OK to close the dialog box. Now, we'll want to set up our Counter.
Figure B: Setting the Network Alert to send to a remote system
will cause a notification dialog box to be displayed when a threshold has
been passed.
Adding an alert
From the menu bar, select Edit | Add To Alert to display the Add To Alert dialog box, as shown in Figure C. The Processor Object and % Processor Time Counter are already selected, so we'll only need to input our threshold condition. In the Alert If text field, type 40. Click Add to create your alert and click Done to close the dialog box. Now we need to test our Counter.
Figure C: The % Processor Time is selected by default.
Note: Performance Monitor is not a service. You must start it and leave it running in order to send out alerts. |
Start opening programs on your system. It doesn't matter which ones you run, as long as you run enough of them. You'll soon see a message box pop up like the one seen in Figure D. When you go back to Performance Monitor, you'll see that the alerts were also logged there, as seen in Figure E.
Figure D: Performance Monitor notifies you when a threshold has
been crossed.
Figure E: As well as sending out a network alert, Performance
Monitor logs each occurrence of an alert event.
Modifying existing alerts
As you probably guessed, 40 percent is too low a threshold for everyday use. You modify your alert by highlighting the alert in the Alert Legend list and selecting Edit | Edit Alert Entry. The Edit Alert dialog box will only allow you to change the Color, the Alert If condition, and the Run Program On Alert settings. If you want to change any other setting, you must create a new alert. Change the Alert If condition of your alert to 80, a common setting for this counter. If you consistently see alerts warning you that the % Processor Time is exceeding 80 percent, you may want to consider moving some of the application off of your server or upgrading the processor.
Monitoring the Processor Queue Length
Another important measure of resource use is the Processor Queue Length. This is the length of the processor queue in units of threads. All processors use a single queue in which threads wait for processor cycles. Monitoring your Processor Queue Length counter can alert you if threads waiting to process are overrunning your system's processor. You create an alert for the Processor Queue Length counter just as you did for the % Processor Time counter. First, you select Edit | Add To Alert from the menu bar to display the Add To Alert dialog box that we saw in Figure C. Next, click on the Object dropdown arrow. The Processor Queue Length is a counter of the System object, so you need to scroll down and highlight the System entry.
Then, scroll through the Counter list until you find the Processor Queue Length entry. Click on the line to highlight it. Fill in the Alert If fields to notify you when this counter is over 2. Your dialog box should now resemble the one in Figure F. Click Add, and then Done to create your alert. You may need to modify the Processor Queue Length threshold for your system, but in general, if this counter consistently exceeds 2, you're asking your system to do too much for its current processor capabilities.
Figure F: Processor Queue Length is a counter of the System
object.
Monitoring Interrupts/Sec
The last counter we'll configure is the Interrupts/Sec counter of the Processor object. This counter shows the rate of requests from I/O devices. A sudden increase can indicate a hardware problem. This counter is configured just like the others. Select the Processor object, then the Interrupts/Sec counter. Configure the Alert If fields to alert when the counter exceeds 200. This number may be too low for your system. If this threshold produces too many alerts, you'll need to raise it.
Creating an alert for a remote system
Configuring Performance Monitor to watch the resources on a remote machine is simple, but it requires the correct permissions. You must be logged on as a user who has Log On Locally rights on the remote system. If you're setting up an alert for an NT Server, this usually means you'll need to log on as a member of the remote machine's Administrator group. Once you've logged on as a user with the correct permissions, creating an alert for a remote system is almost identical to creating an alert for the local system. Select Edit | Add To Alert from the menu bar to display the Add To Alert dialog box that was shown in Figure C. This time, however, you'll change the Computer text field to specify a remote system. You can do this by typing the Universal Naming Convention (UNC) path, such as \\JUPITER, or you can click the ellipsis button (...) to launch the Select Computer dialog box, as shown in Figure G. After you've selected the computer to monitor, you configure the rest of the Add To Alert dialog just as you would for a local alert.
Figure G: Using the Select Computer dialog can make it easy to
find a remote system.
Conclusion
Performance Monitor alerts are an invaluable tool in maintaining a healthy server. They can notify you of problems and bottlenecks before your network users are dramatically affected. Using them on remote systems allow you to track all of your servers from a single point.
There are many other counters that can provide useful alerts. There is detailed information on all of the Performance Monitor counters in the COUNTERS.HLP file found on the Windows NT 4.0 Resource Kit CD-ROM. |
Copyright © 1999, ZD
Inc. All rights reserved. ZD Journals and the ZD Journals logo are trademarks of ZD
Inc. Reproduction in whole or in part in any form or medium without
express written permission of ZD Inc. is prohibited. All other product
names and logos are trademarks or registered trademarks of their
respective owners.