1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

autoconf support

This commit is contained in:
Mike Koss 2012-02-14 16:48:07 -08:00
parent 7de8f2cab4
commit 240cf1fdb0

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