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

Fixed average memory graphing label error.

Fixed average memory graphing label error.
This commit is contained in:
Gareth Davies 2013-05-16 19:27:13 +08:00
parent 8ff6e0fdf2
commit 9dfe0f34ca

View File

@ -48,17 +48,16 @@ elif [ "$mode" = "average" ]; then
if [ "$1" = "config" ]; then
echo 'graph_title Unicorn Average Process Size'
echo 'graph_args --base 1024 -l 0 '
echo 'graph_vlabel Unicorn Average Process Size'
echo 'graph_vlabel Average Process Size'
echo 'graph_category Unicorn'
echo 'unicorn_average.label Unicorn Average Proccess Size'
echo 'unicorn_average.label Average Process Size'
echo 'unicorn_average.draw LINE2'
echo 'unicorn_average.info The average process size for Unicorn'
else
echo -n "average.value "
echo -n "unicorn_average.value "
ps awwwux | grep 'unicorn worker' | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
exit 0
fi
fi
exit 0