cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Script to monitor memory on a Windows system

Typically ipMonitor's Memory Monitor is used to monitor memory on a Windows system, however, this script can prove to be handy for troubleshooting issues with monitoring memory over WMI.

This script will allow you to monitor the physical memory on a remote machine, without using SNMP and Microsoft's Performance Monitoring SNMP Extensions.

The sample script returns the following: 

  • 1 if amount of available memory exceeds the threshold
  • 0 if the amount of available memory is less than or equal to the threshold value

Sample Monitor Settings
For the following example, we will assume the following:
Minimum Amount of Available Memory Required: 128
Unit for Comparison: MB
Script Location: c:\ipm7scripts\

For Windows 2000
Executable Name: cscript.exe
Directory: c:\winnt\system32\
Command Line Parameters: perfmon_physmem.vbs REMOTESRV 128 MB
Startup Directory: c:\ipm7scripts\
 
Compare the Process Return Value = SELECTED
Expected Return Value: 1

For Windows XP / 2003
Executable Name: cscript.exe
Directory: c:\windows\system32\
Command Line Parameters: perfmon_physmem.vbs REMOTESRV 128 MB
Startup Directory: c:\ipm7scripts\
 
Compare the Process Return Value = SELECTED
Expected Return Value: 1

In the event the amount of Available Memory on the remote machine is less than or equal to the threshold value, the script will return a 0, which will trigger an Alert.

Labels (1)
Attachments
Version history
Revision #:
1 of 1
Last update:
‎02-10-2010 12:00 AM
Updated by: