Server in the Enterprise - Instruktion Lab 2


Windows NT Server Analysis and Optimization (PerfMon)

Creating a Real-Time Chart
· To enable disk counters
  1. Log on as Administrator, and in the Password box type password
  2. Click Start, point to Programs, and then click Command Prompt
  3. At the command prompt, type diskperf -y and then press ENTER. This step is necessary to enable monitoring of disk counters
  4. Shut down and restart your computer

· To set up the chart
  1. Log on as Administrator, and in the Password box, type password
  2. Click Start, point to Programs, point to Administrative Tools (Common), and then click Performance Monitor
  3. On the View menu, click Chart
  4. On the Edit menu, click Add to Chart. The Add to Chart dialog box appears
  5. Using the following counters that become available for the Memory (Cache bytes, Page/Sec), Physical Disk (%Disk Time, Avg.Disk Bytes/Read, Avg.Disk Bytes/Write), and Processor (%Privileged Time, %Processor Time, %User Time) Objects. Click Add after each counter that you add
  6. Click Done. The graph appears, displaying the real time activities of the memory, physical disk and processor objects

· To generate chart activity
  1. With Performance Monitor still running, click Start, point to Programs, point to Accessories, and then click Calculator
  2. Begin doing calculations. This will generate CPU cycles
  3. Close the Calculator
  4. Return to the Performance Monitor Chart
  5. Select the %Processor Time counter. Notice the %Processor Time average. To highlight a specific counter on the chart, select a counter, and then press CTRL+H
  6. Minimize the Chart window
  7. Load the minimize both Windows NT Explorer and the Disk Administrator
  8. Return to the Performance Monitor Chart
  9. Notice the activity, such as spikes, on the chart
  10. Close Windows NT Explorer and Disk Administrator

Logging Processor Activity

· To log information
  1. On the View menu in Performance Monitor, click Log
  2. On the Edit menu, click AddTo Log
  3. In the Objects dialog box, hold down the CTRL key while you click Memory, Physical Disk, and Processor, and then click Add
  4. Click Done
  5. On the Options menu, click Log
  6. In the Log Options File Name box type labXXX.log
  7. Under Update Time, click Periodic Update
  8. In the Interval box, click 1, and then click Start Log
  9. Create processor activity by starting applications or moving the mouse
  10. Collect at least 1MB of data. Check the File Size box in the Performance Monitor window to determine when your file reaches 1MB.
  11. On the Options menu, click Log
  12. Click Stop Log

· To display logged information
  1. On the View menu, click Chart
  2. On the Options menu, click Data From. The dialog box appears
  3. In the Data From dialog box, click the button with the ellipsis (...) on it. The dialog box appears
  4. Click the labXXX.log, and then click Open. Indicating data values will be displayed from your log file
  5. Click OK
  6. On the Edit menu, click Add To Chart
  7. Using the following counters that become available for the Memory (Cache bytes, Page/Sec), Physical Disk (%Disk Time, Avg.Disk Bytes/Read, Avg.Disk Bytes/Write), and Processor (%Privileged Time, %Processor Time, %User Time) Objects. Click Add after each counter that you add
  8. Click Done. The chart displays the information collected in your log

Working with Data

· To determine how much data is displayed
  1. Refer to the Average field on your chart. Whwt is the average %Processor Time?
  2. On the Edit menu click Time Window. The Input Log File Timeframe dialog box appears.
  3. Adjust the sliding window to see only part of the graph has large spikes for any of the counters, and then click OK
  4. What is the Average %Processor Time for this part of the graph?
  5. How accurate do you think this reoresentation of the processor's use is?
  6. Adjust the time window to see the entire graph

· To create a report
  1. On the View menu, click Report
  2. On the Edit menu, click Add to Report. The dialog box appears
  3. Using the following counters that become available for the Memory (Cache bytes, Page/Sec), Physical Disk (%Disk Time, Avg.Disk Bytes/Read, Avg.Disk Bytes/Write), and Processor (%Privileged Time, %Processor Time, %User Time) Objects. Click Add after each counter that you add
  4. Click Done. The report displays the information collected in your log

Generating Alerts

· To generate an alert
  1. On the View menu, click Alert
  2. On the Edit menu, click Add to Alert. The dialog box appears
  3. In the Object list, Click Memmory, and in the Counter box, click %Commiteted Bytes in Use. In the Alert If box click Over and type 50 in the box, and then click Add
  4. In the Object list, Click Physical Disk, and in the Counter box, click %Disk Time. In the Alert If box click Over and type 20 in the box, and then click Add
  5. In the Object list, Click Processor, and in the Counter box, click %Processor Time. In the Alert If box click Over and type 20 in the box, and then click Add
  6. Click Done. If no alerts appears in the Alert Log. Double click the three counters at the bottom of the window and lower the value until alerts appear in the list
  7. Exit Performance Monitor

Creating Performance Monitor Log Files

· To create the log file
  1. Log on as Administrator, and in the Password box, type password
  2. Start Performance Monitor, and on the View menu, click Log
  3. On the Edit menu, click AddTo Log
  4. In the Objects box, select all of the listed items by holding down the SHIFT key while you click the mouse, click Add, and then click Done
  5. In the Options menu click Log
  6. In the File Name box, type labYYY.log in the Interval (seconds) list, click 1, and then click Start Log. The log file will begin logging statistcs, and the file size will grow
  7. When the log has run for two minutes, on the Options menu, click Log, and then click Stop Log. You have just created a measurement baseline. Your computer was in a fairly static, low usage state. Use this baseline to compare the computer under varying loads

· To open the data file
  1. On the Options menu, click Data From'
  2. Click Log File and then click the button with the ellipsis (...) on it
  3. Click labYYY, and then click Open. The Data From dialog box appears, displaying c:\labYYY.log as the source of data to display
  4. Click OK to return to Performance Monitor

Viewing and Relogging the Data

· To view logged data
  1. On the View menu, click Chart
  2. On the Edit menu, click Add To Chart
  3. Click the arrow next to the Object list to view the objects contained in the log file. This includes more data than necessary for analysis of the four major checkpoints
  4. When you're done viewing the items in the Object list, click Cancel to close it
  5. To close the Add to Chart dialog box, click Cancel. A blank Perf Mon chart appears

· To create a new log file
  1. On the view menu, click Log. The status bar still displays c:\labYYY.log as source of data
  2. On the Edit menu, click Add To Log.
  3. In the Objects box, click each of following objects, and then click Add to add them to the log:
    IP
    Memory
    Network segment
    PhysicalDisk
    Process
    Server
    System
    TCP
    UDP
  4. Click Done. The appropiate objects have been added to the log
  5. On the Options menu, click Log
  6. Complete the Log Options with following:
    File Name: baseline.log
    Interval (seconds): 1
  7. Click Relog File to create a new log file