#!/usr/bin/env bash # Nagios plugin to check process group memory consumption # Origin: # @see http://unix.stackexchange.com/questions/233944/how-to-view-summaric-memory-usage-of-groups-of-commands-instead-of-processes # @see https://github.com/jonschipp/nagios-plugins/blob/master/check_memory.sh # Nagios Exit Codes OK=0 WARNING=1 CRITICAL=2 UNKNOWN=3 # set default values for the thresholds WARN=80 CRIT=90 usage() { cat <