Projet

Général

Profil

Révision 4b4a6a01

ID4b4a6a01e1e085516868134be88d8200db49c50b
Parent 0987cf33
Enfant 4d2d1fb9

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

Plugins xen_*: fix shellcheck issues

Voir les différences:

plugins/xen/xen_memory
31 31
        echo 'graph_vlabel MB'
32 32
        echo 'graph_category Virtualization'
33 33
        echo 'graph_info This graph shows of many mS wall time where used by a domain'
34
                # xm info | while read name bla value; do echo "$name $value"; done
35
         $XM info | while read name bla value; do
36
                                #total_memory 2047
37
                                #free_memory 1476
38
                name=`echo $name | sed -e"s/-/_/"`
34
        "$XM" info | while read -r name bla value; do
35
                # total_memory 2047
36
                # free_memory 1476
37
                name=$(echo "$name" | sed -e"s/-/_/")
39 38

  
40 39
                if [ "$name" = "total_memory" ]; then
41 40
                        echo "$name.label $name"
......
55 54
        exit 0
56 55
fi
57 56

  
58
$XM info | while read name bla value; do
59
        name=`echo $name | sed -e"s/-/_/"`
60
        if [ "$name" = "total_memory" ]; then
61
                echo "$name.value $value"
62
        fi
63
        if [ "$name" = "free_memory" ]; then
57
# shellcheck disable=SC2034
58
"$XM" info | while read -r name bla value; do
59
        name=$(echo "$name" | sed -e"s/-/_/")
60
        if [ "$name" = "total_memory" ] || [ "$name" = "free_memory" ]; then
64 61
                echo "$name.value $value"
65 62
        fi
66 63
done
67

  

Formats disponibles : Unified diff