diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md index fb67665af793dd83be7a7282a4ef7e36517fa666..5cb5fc2666c0f117ada8701ba583a687aaf73a24 100644 --- a/docs/20_Checks/_index.md +++ b/docs/20_Checks/_index.md @@ -38,7 +38,7 @@ There is one include script used by all checks: * [check_packages2install](check_packages2install.md) * [check_php-fpm-status](check_php-fpm-status.md) * [check_proc_mem](check_proc_mem.md) -* check_proc_ressources +* [check_proc_ressources](check_proc_ressources.md) * check_proc_zombie * [check_psqlserver](check_psqlserver.md) * [check_rearbackup](check_rearbackup.md) diff --git a/docs/20_Checks/check_proc_ressources.md b/docs/20_Checks/check_proc_ressources.md new file mode 100644 index 0000000000000000000000000000000000000000..e0722fb201ded80262494a2043a3e8c567394c33 --- /dev/null +++ b/docs/20_Checks/check_proc_ressources.md @@ -0,0 +1,84 @@ +# Check process resources regarding cpu and memory + +## Introduction + +Show processes that consume the most memory or cpu. +You get a list with usage, process id and process + +## Requirements + +Nothing special. + +## Syntax + +```txt +______________________________________________________________________ + +CHECK_PROC_RESSOURCES +v1.3 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 + +https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_proc_ressources.html +______________________________________________________________________ + +SYNTAX: + + check_proc_ressources -m METHOD [-w WARNLIMIT] [-c CRITICALLIMIT] + +EXAMPLE: + + -h, --help + show help + + -c, --critical VALUE + critical value; defaults: + * cpu 90 + * mem 90 + + -m, --mode VALUE + identify what to check; one of cpu|mem + Remark: for cpu the given limits are multiplicated with count of cpu. + + -w. --warning VALUE + warning limit value; defaults: + * cpu 70 + * mem 70 + +EXAMPLE: + + check_proc_ressources -m mem -w 50 -c 70 + Show processes consuming more than 50% of memory; mark as critical + when using 70% and more. + +``` + +## Examples + +### CPU check + +`./check_proc_ressources -m cpu -w 50 -c 70` returns + +```txt +OK: all processes below warning limit 200 % Cpu .. (and critical limit 280 %) + +Cpus detected: 4 +``` + +### Memory check + +`./check_proc_ressources -m mem -w 10 -c 70` returns + +```txt +WARNING: 1 processes use 10 % .. 70 % Memory + +Level Usage process id process +----------------------------------------------------- +Warning 10.9 % Memory 3807 pamac-manager + +MemTotal: 16135088 kB +MemFree: 1420576 kB +MemAvailable: 3913212 kB +Cached: 4560964 kB +```