Skip to content
Snippets Groups Projects
Commit d58949e1 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

check_memory: add doc page

parent 8ab71eee
Branches
No related tags found
1 merge request!1306468 docs and harmonize
...@@ -54,6 +54,8 @@ Check memory usage incl. free, used and total memory. ...@@ -54,6 +54,8 @@ Check memory usage incl. free, used and total memory.
On higher memory usage the process table with top 5 top consumers will On higher memory usage the process table with top 5 top consumers will
be shown. be shown.
This plugin sends performancedata.
SYNTAX: SYNTAX:
$(basename $0) [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-s SWAP_LIMIT] [-p PROCESS_LIMIT] [-h] $(basename $0) [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-s SWAP_LIMIT] [-p PROCESS_LIMIT] [-h]
......
...@@ -24,7 +24,7 @@ There is one include script used by all checks: ...@@ -24,7 +24,7 @@ There is one include script used by all checks:
* [check_fs_writable](check_fs_writable.md) * [check_fs_writable](check_fs_writable.md)
* [check_haproxy_health](check_haproxy_health.md) * [check_haproxy_health](check_haproxy_health.md)
* [check_haproxy_status](check_haproxy_status.md) * [check_haproxy_status](check_haproxy_status.md)
* check_memory * [check_memory](check_memory.md)
* check_mysqlserver * check_mysqlserver
* check_netio * check_netio
* [check_netstat](check_netstat.md) * [check_netstat](check_netstat.md)
......
# Check Memory (RAM)
## Introduction
**check_memory** Check memory usage incl. free, used and total memory.
It reads /proc/meminfo and fetches the needed values.
* MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code)
* MemFree: Is sum of LowFree+HighFree (overall stat)
* MemAvailable: delta of total - free
* Buffers: Memory in buffer cache. mostly useless as metric nowadays Relatively temporary storage for raw disk blocks shouldn’t get tremendously large
* Cached: Memory in the pagecache (diskcache) minus SwapCache, Doesn’t include SwapCached
* SwapCached: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn’t need to be swapped out AGAIN because it is already in the swapfile. This saves I/O )
* SwapTotal: Total amount of physical swap memory.
* SwapFree: Total amount of swap memory free. Memory which has been evicted from RAM, and is temporarily on the disk
* Slab: in-kernel data structures cache
* SReclaimable: reclaimable parts of Slab, e.g., caches
## Syntax
```txt
______________________________________________________________________
CHECK_MEMORY
v1.9
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_memory.html
______________________________________________________________________
Check memory usage incl. free, used and total memory.
On higher memory usage the process table with top 5 top consumers will
be shown.
This plugin sends performancedata.
SYNTAX:
check_memory [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-s SWAP_LIMIT] [-p PROCESS_LIMIT] [-h]
OPTIONS:
-w VALUE Warning level for RAM usage [%]; default: 75
-c VALUE Critical level for RAM usage; default: 90
-s VALUE Critical level for SWAP usage; default: 50
-p VALUE show process info with highest memory consumption if
usage is > NN %; default: 50
-h or --help show this help.
PARAMETERS:
none
EXAMPLE:
check_memory -w 90 -c 95 -p 70
```
### Requirements
* bc
## Examples
`$ check_memory -w 90 -c 95 -p 70` returns
```txt
OK: RAM usage 46 % of 7955 MB (machine has no Swap)
MemTotal: 8146916 kB
MemFree: 901724 kB
MemAvailable: 4328748 kB
Buffers: 117988 kB
Cached: 3045292 kB
SwapCached: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Slab: 682424 kB
SReclaimable: 591596 kB
|memory-total=7955MB;;;0;7955 memory-used=3729MB;;;0;7955 memory-avail=4226MB;;;0;7955 memory-free=880MB;;;0;7955 memory-buffers=115MB;;;0;7955 memory-cached=2973MB;;;0;7955 memory-sreclaim=577MB;;;0;7955
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment