Révision 5fb2e02e
Plugin multibandwidth: explicit handling of configuration variables
| plugins/network/multibandwidth | ||
|---|---|---|
| 20 | 20 |
|
| 21 | 21 |
=head1 CONFIGURATION |
| 22 | 22 |
|
| 23 |
The following is the default configuration |
|
| 23 |
The following example configuration shows all settings. Only "hosts" is required for |
|
| 24 |
minimal configuration. |
|
| 24 | 25 |
|
| 25 | 26 |
[multibandwidth] |
| 26 | 27 |
user root |
| ... | ... | |
| 30 | 31 |
env.big_packet_size 108 |
| 31 | 32 |
env.max_valid_bps 15728640 |
| 32 | 33 |
|
| 33 |
- env.hosts explanation: hostname or IP of the hosts to calculate the bandwidth. |
|
| 34 |
- env.hosts: space separated list of hostnames or IPs of the hosts to calculate the bandwidth. |
|
| 35 |
This setting is required. |
|
| 34 | 36 |
|
| 35 |
- env.samples explanation: Reset stats after sending samples ECHO_REQUEST packets. |
|
| 37 |
- env.samples: Reset stats after sending this number of ECHO_REQUEST packets. |
|
| 38 |
Defaults to 15 samples. |
|
| 36 | 39 |
|
| 37 |
- env.small_packet_size explanation: Specifies the number of data bytes to be sent in the small
|
|
| 40 |
- env.small_packet_size: Specifies the number of data bytes to be sent in the small |
|
| 38 | 41 |
packets. The default and minimum value is 44. |
| 39 | 42 |
|
| 40 |
- env.big_packet_size explanation: Specifies the number of data bytes to be sent in the big
|
|
| 43 |
- env.big_packet_size: Specifies the number of data bytes to be sent in the big |
|
| 41 | 44 |
packets. The default is 108. The size should be chosen so that big packet roundtrip times |
| 42 | 45 |
are long enough to be accurately measured. |
| 43 | 46 |
|
| 44 |
- env.max_valid_bps explanation: bing have some random spikes. This variable is used to indicate
|
|
| 47 |
- env.max_valid_bps: bing have some random spikes. This variable is used to indicate |
|
| 45 | 48 |
the maximum value of mbps that can be recorded (in bps). |
| 49 |
Defaults to the empty string (no validity check). |
|
| 46 | 50 |
|
| 47 | 51 |
=head1 MAGIC MARKERS |
| 48 | 52 |
|
| ... | ... | |
| 64 | 68 |
=cut |
| 65 | 69 |
|
| 66 | 70 |
|
| 71 |
hosts=${hosts:-}
|
|
| 72 |
samples=${samples:-15}
|
|
| 73 |
small_packet_size=${small_packet_size:-44}
|
|
| 74 |
big_packet_size=${big_packet_size:-108}
|
|
| 75 |
max_valid_bps=${max_valid_bps:-15728640}
|
|
| 76 |
|
|
| 67 | 77 |
|
| 68 | 78 |
case $1 in |
| 69 | 79 |
config) |
Formats disponibles : Unified diff