Performance Monitor is a powerful tool for monitoring system performance in Windows 2000 and Windows XP. As a system administrator, you can easily track things such as CPU usage, memory usage, and SQL Server performance. Although the interface may be hard to navigate initially, as shown in Figure 24.3, a little searching will get you on your way quite quickly. Figure 24.3. Performance Monitor Main WindowTo fully understand Performance Monitor, you need to understand two basic terms: counter and object. A counter contains various values associated with an object, such as total count and count per unit time. An object represents the actual hardware and software components. The components can be physical or logical in nature. For every object (such as system RAM, TCP/IP protocols, and CPU), Microsoft has included a preset counter. This counter usually measures the most basic (and useful) aspect of a given object. Logging CPU UsageStart by adding a simple counter. From the main window, expand the tree node labeled Performance Logs and Alerts. Click Counter Logs. This screen displays all Counter Logs. Icons are darker and lighter for stopped and running services, respectively, as shown in Figure 24.4. Figure 24.4. View Existing Counter Logs.Right click Counter Logs or in a blank space in the log list to the right. Select New Log Settings from the resulting context menu. You will be prompted for a log name. Type in a name such as CPU Usage and press OK. The resulting window has three tabs: General, Log Files, and Schedule, as shown in Figure 24.5. On the General tab, click Add Objects. Select Processor from the list of objects. Press OK. This option will use the default counter for the Processor object. (Pressing Add Counters will allow you to select particular aspects of the processor to log.) Figure 24.5. Set the Options for Your New Counter.From this tab you can also select parameters such as Interval and Log File size; both of these can be very useful. Log files can quickly become large, so setting a file size limit can be a smart way to prevent future problems. Once the log file size is reached, the counter automatically stops. You want to set the interval at a rate that can give you accurate sampling, but best performance. The faster the interval, the quicker the log file grows and the more system performance is used. NOTE NOTE: Logging in and of itself can take considerable system resources. For instance, logging available CPU resources will be offset by the resources Performance Monitor uses to log. This should be accounted for when using the data. On the Log Files tab, you can select your log file format and naming conventions. The Schedule tab allows you to automatically control the logging process. Not only can you set a start and finish date, you can specify certain hours of the day to run the Counter. You can also obviously leave the scheduling open ended and stop it manually. If you do not specify a schedule, the counter will run immediately upon your pressing OK. After you've logged your information, you may want to view the information as a chart at a later date. This format will allow for easy, visual interpretation of collected data. Following are the steps you'll need to complete to view the information in chart format:
NOTE: Just as you can have multiple real-time counters, you can add multiple log files. When these items are logged to disk, the log includes the PerfMon session, which may include several counters. |