Skip Navigation LinksHome > SSW Standards > Developer Installation Network Setup > SSW Using Performance Monitor

Overview

Performance monitor checks the state of the system periodically and can perform an action, when criteria are met. Performance monitor is most useful when it is configured to send an email. 

Installation

Enable disk performance counters for logical drives

Disk performance

Figure 1 The default "Disk Performance Counters" for Windows 2000 has physical on (but logical is off)

You need to check what "Disk Counters" are running when Windows starts. To be able to monitor the free disk space, you need the logical disk performance counters enabled. Note: They are enabled by default on Windows XP. If using Windows 2000 run the following commands in a command prompt.

Enable disk performance counters for logical drives (the following alerts need this on) DISKPERF YV

This will require the computer to be rebooted.

Enable SMTP Service

  1. Right-click My Computer > Manage
  2. Expand Services and Applications
  3. Click Services
  4. Right-click Simple Mail Transfer Protocol > Properties
  5. Change startup type to Automatic
  6. Start the service if it is not running

Install the VB Script to send email

  1. Make a new folder on the Hard Drive
    • For Servers C:\DataPerformanceMonitor
    • For Workstations C:\Data<username>\DataPerformanceMonitor
  2. Make these 2 files get latest version of the code from the URL, change the file type from .txt to .cmd
    before use.

    emailPerfmonAlert.cmd

    @ECHO OFF

    REM '----------------------------------------------
    REM ' Copyright 2001 SSW
    REM ' www.ssw.com.au All Rights Reserved.
    REM
    REM Master in http://www.ssw.com.au/ssw/KB/CodeBase/15PerformanceMonitorEmail/

    emailPerfmonAlert.vbs

    '----------------------------------------------
    ' Copyright 2001 SSW
    ' www.ssw.com.au All Rights Reserved.

    ' Master in http://www.ssw.com.au/ssw/KB/CodeBase/15PerformanceMonitorEmail/

Create an Alert

  1. Open Performance Monitor - from the Start menu > Programs > Administrative tools > Performance
  2. Expand Performance logs and alerts
  3. Right-click Alerts
  4. Choose New Alert Settings...
  5. Enter an Alert name 'System Check'
  6. Click Add to add counters
  7. Add the following counters

    Useful counters

    GroupCounterAlert When
    Paging File% Usage (Total)Over 85
    Logical DiskFree MegabytesUnder 200
    MemoryAvailable MbytesUnder 1

  8. Change the sample data interval to every 5 minutes

    System Check

  9. Click the Action Tab
  10. Tick Run this Program
  11. Browse for the .cmd file

  12. Press command line arguments
  13. uncheck Single argument string
  14. check Text message
  15. enter the email address to send the alert to in the Text message box
  16. for servers enter 'ServerEvents@s*w.com.au'
  17. NOTE: If a performance value has been reached, you will get a email every time the interval is reached.
    e.g. So if the hard drive was full on Friday afternoon, on Monday morning you would be greeted with thousands of emails to start the working week.

     

    Now we want to make sure the alerts keep working on a reboot

  18. Select the Schedule tab
  19. Choose 'At:' and make sure the current time and date are entered
  20. Under 'Stop scan' select 'After'
  21. enter 100,000 in the number and select days as the units
  22. check 'Start a new scan'
    NB: This makes sure that the alert starts when the computer restarts

  23. Start the Alert by right-clicking on the new alert and choosing start (if it is not running automatically)

    Start Alert

Enable alerts for Mirrors

 

References

HOW TO: Add Error Logging for Low Disk Space in System Monitor in Windows 2000 http://support.microsoft.com/?kbid=299921

 

Acknowledgements

JV 17/02/2004