Projet

Général

Profil

Révision 17f78427

ID17f784270ae966ee9a13e9f5104a5b8f925b639e
Parent ef851f0c
Enfant d4320aea, 5b2396a9

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

Whitespace cleanup

  • remove trailing whitespace
  • remove empty lines at the end of files

Voir les différences:

plugins/lxc/lxc_net
24 24
This plugin reads a "lxc.network.veth.pair" setting from "config" file of each container,
25 25
because lxc-start command creates a random named veth device without the setting.
26 26

  
27
If your xen config (/var/lib/lxc/GUEST_NAME/config does not contain this parameter, 
27
If your xen config (/var/lib/lxc/GUEST_NAME/config does not contain this parameter,
28 28
then you have to fill it, because if every guest restart generate new device name, then the graph will be useless
29 29
( example config : lxc.network.veth.pair = vethsamba )
30 30

  
......
56 56
        echo "no ($lxcdir is not present)"
57 57
        exit 0
58 58
    fi
59
    
59

  
60 60
    echo yes
61 61
fi
62 62

  
......
86 86
    echo "graph_vlabel bits in (-) / out (+) per ${graph_period}"
87 87
    echo "graph_category network"
88 88
    echo "graph_info This graph shows the traffic of active LXC containers."
89
    
89

  
90 90
    for guestname in $actives; do
91 91
        guest=$(clean_fieldname $guestname)
92 92
        device=$(eval 'echo $dev_'$guest)
......
95 95
            bps=$(cat /sys/class/net/$device/speed)
96 96
            bps=$(($bps * 1000 * 1000))
97 97
        fi
98
        
98

  
99 99
        echo "${guest}_down.label $guestname"
100 100
        echo "${guest}_down.type DERIVE"
101 101
        echo "${guest}_down.graph no"
......
120 120
    line=`grep "^ *$device_re:" /proc/net/dev`
121 121
    echo -n "${guest}_down.value "
122 122
    echo $line | awk '{
123
            split($0, a, /: */); 
123
            split($0, a, /: */);
124 124
            print  $2;
125 125
    }'
126 126
    echo -n "${guest}_up.value "
127 127
    echo $line | awk '{
128
            split($0, a, /: */); 
129
            print  $10; 
128
            split($0, a, /: */);
129
            print  $10;
130 130
        }'
131 131
done

Formats disponibles : Unified diff