## Check process resources regarding cpu and memory Script: `check_proc_ressources` Show processes that consume the most memory or cpu. You get a list with usage, process id and process ## Requirements Nothing special. ## Standalone installation From this repository ypu need next to this script: * `inc_pluginfunctions` shared function for all IML checks written in bash ## 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 ```