2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #32 from mckoss/240cf1fdb00336091b524edce728f7d6eb5f9980

Added autoconf support
This commit is contained in:
Kenyon Ralph 2012-02-15 10:36:03 -08:00
commit 41bf031a2e

View File

@ -2,9 +2,13 @@
#
# Munin plugin for monitoring Nginx working set
#
# ---
# by Mike Koss, Feb 12, 2012 - MIT License
#
#%# family=auto
#%# capabilities=autoconf
if [ "$1" == config ]; then
case $1 in
config)
cat <<'EOF'
graph_title NGINX Working Set
graph_vlabel WS Bytes
@ -13,7 +17,17 @@ graph_args --base 1024
ws.label Working Set
EOF
exit 0
fi
;;
autoconf)
if [ "$(pidof nginx)" == "" ]; then
echo no
else
echo yes
fi
exit 0
;;
esac
KBS=$(ps -o rss --no-heading -p $(pidof nginx))
total=0