CheckMem

This check checks the memory (page) usage and generates a state if the memory is above or below give parameters.

OptionValuesDescription
MaxWarnsize-value or %The maximum size allowed before a warning state is returned.
MaxCritsize-value or %The maximum size allowed before a critical state is returned.
MinWarnsize-value or %The minimum size allowed before a warning state is returned.
MinCritsize-value or %The minimum size allowed before a critical state is returned.
ShowAllNone, longAdd this option to show info even if no errors are detected. Set it to long to show detailed information.
typepage, paged, virtual, physicalWhat kind of memory to check (does not yet support stacking to check multiple kinds)

The size-value or % is a normal numeric-value with an optional unit or percentage postfix to specify large sizes. The available postfixes are B for Byte, K for Kilobyte, M for Megabyte, G for Gigabyte and finally % for percent free space.

What the different types really mean

TypeMeaning
pageThe maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value.
pagedSystem-wide committed memory limit (same as used in NSCLient, ie. via PDH, available on NT4)
virtual Number of pages of swap currently in use (note - it does NOT = (physical + swap) as on *nix boxes) According to M$ this is: Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process, in bytes.
physicalThe amount of physical memory currently available, in bytes. This is the amount of physical memory that can be immediately reused without having to write its contents to disk first. It is the sum of the size of the standby, free, and zero lists.

Examples

Page

Check that the page is below 80%:

Sample Command:

CheckMEM MaxWarn=80% MaxCrit=90% ShowAll type=page
OK: OK: page: 758M (795205632B)
Nagios Configuration:
define command {
  command_name <<CheckMEM>>
  command_line check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=page
}
<<CheckMEM>> 80!90
From Commandline (with NRPE):
check_nrpe -H IP -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=page

Physical

Check that the physical is below 80%:

Sample Command:

CheckMEM MaxWarn=80% MaxCrit=90% ShowAll type=physical
OK: OK: physical: 758M (795205632B)
Nagios Configuration:
define command {
  command_name <<CheckMEM>>
  command_line check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical
}
<<CheckMEM>> 80!90
From Commandline (with NRPE):
check_nrpe -H IP -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=physical

Multiple

Check that the physical is below 80%:

Sample Command:

CheckMEM MaxWarn=80% MaxCrit=90% ShowAll type=physical type=page type=virtual
OK: ...
Nagios Configuration:
define command {
  command_name <<CheckMEM>>
  command_line check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical type=page type=virtual
}
<<CheckMEM>> 80!90
From Commandline (with NRPE):
check_nrpe -H IP -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=physical type=page type=virtual