mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Plugin apache_memory: use base SI units for result
Munin will take care for proper units dynamically. This breaks previously existing graphs.
This commit is contained in:
parent
d8fd604e8f
commit
e7fbfe0b8b
1 changed files with 3 additions and 3 deletions
|
@ -43,8 +43,8 @@ fi
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
echo 'graph_title Average size of apache child processes'
|
echo 'graph_title Average size of apache child processes'
|
||||||
echo 'graph_args --base 1000 -l 0 '
|
echo 'graph_args --base 1024 -l 0 '
|
||||||
echo 'graph_vlabel Kb'
|
echo 'graph_vlabel Bytes'
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
echo 'graph_category webserver'
|
echo 'graph_category webserver'
|
||||||
echo 'graph_info Indicate the memdium size of all the apache child process.'
|
echo 'graph_info Indicate the memdium size of all the apache child process.'
|
||||||
|
@ -58,7 +58,7 @@ fi
|
||||||
|
|
||||||
matched_processes=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep)
|
matched_processes=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep)
|
||||||
if [ -n "$matched_processes" ]; then
|
if [ -n "$matched_processes" ]; then
|
||||||
average_memory=$(printf '%s' "$matched_processes" | awk '{count+=1; sum+=$6} END {print sum/count}')
|
average_memory=$(printf '%s' "$matched_processes" | awk '{count+=1; sum+=$6} END {print sum / count * 1024}')
|
||||||
else
|
else
|
||||||
average_memory="U"
|
average_memory="U"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue