Projet

Général

Profil

Révision e7fbfe0b

IDe7fbfe0b8b12cde37600298ee4878a993ea798e2
Parent d8fd604e
Enfant 62ff5981

Ajouté par Lars Kruse il y a plus de 5 ans

Plugin apache_memory: use base SI units for result

Munin will take care for proper units dynamically.

This breaks previously existing graphs.

Voir les différences:

plugins/apache/apache_memmory
43 43
if [ "$1" = "config" ]; then
44 44

  
45 45
    echo 'graph_title Average size of apache child processes'
46
    echo 'graph_args --base 1000 -l 0 '
47
    echo 'graph_vlabel Kb'
46
    echo 'graph_args --base 1024 -l 0 '
47
    echo 'graph_vlabel Bytes'
48 48
    echo 'graph_scale no'
49 49
    echo 'graph_category webserver'
50 50
    echo 'graph_info Indicate the memdium size of all the apache child process.'
......
58 58

  
59 59
matched_processes=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep)
60 60
if [ -n "$matched_processes" ]; then
61
    average_memory=$(printf '%s' "$matched_processes" | awk '{count+=1; sum+=$6} END {print sum/count}')
61
    average_memory=$(printf '%s' "$matched_processes" | awk '{count+=1; sum+=$6} END {print sum / count * 1024}')
62 62
else
63 63
    average_memory="U"
64 64
fi

Formats disponibles : Unified diff