Performance Monitor

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 Window

graphics/24fig03.jpg

To 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 Usage

Start 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.

graphics/24fig04.jpg

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.

graphics/24fig05.jpg

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:

  1. Click on the Source tab in the System Monitor Properties dialog as shown in Figure 24.6.

    Figure 24.6. Select the Chart Source.

    graphics/24fig06.jpg

  2. Press CTRL + L, or use the corresponding button located above the preset, real-time counter chart.

  3. Select the Log files: radio button.

  4. Press the Add button. The default location for log files is automatically displayed.

  5. Select your log file from the list. In our case, this file will be labeled with the prefix CPU Usage. If you want to display only a portion of your log file, use the Time Range selector to drag the time range you want to display.

  6. Press OK. This will instantly load the selected log file and display the information as a chart.

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.




ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ISBN: 321159659
EAN: N/A
Year: 2003
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net