Tune port update (#5795)

* updates to rrdtune docs and script

* added all support
This commit is contained in:
Neil Lathwood
2017-02-07 00:49:16 +00:00
committed by Tony Murray
parent 6380176fe7
commit 5aef36abd6
3 changed files with 18 additions and 5 deletions

View File

@@ -13,10 +13,12 @@ To enable this you can do so in three ways!
Now when a port interface speed changes (this can happen because of a physical change or just because the device has misreported) the max value is set. If you don't want to wait until
a port speed changes then you can run the included script:
scripts/tune_port.php -h <hostname> -p <ifName>
`./scripts/tune_port.php -h <hostname> -p <ifName>`
Wildcards are supported using *, i.e:
scripts/tune_port.php -h local* -p eth*
`./scripts/tune_port.php -h local* -p eth*`
This script will then perform the rrdtool tune on each port found using the provided ifSpeed for that port.
Run `./scripts/tune_port.php` to see help page.

View File

@@ -113,9 +113,12 @@ shouldn't be seeing this. If you are, please report this in [issue 443](https://
#### <a name="faq15"> Why do I see traffic spikes in my graphs?</a>
This occurs either when a counter resets or the device sends back bogus data making it look like a counter reset. We have enabled support for setting a maximum value for rrd files for ports.
Before this all rrd files were set to 100G max values, now you can enable support to limit this to the actual port speed.
rrdtool tune will change the max value when the interface speed is detected as being changed (min value will be set for anything 10M or over) or when you run the included script (scripts/tune_port.php).
rrdtool tune will change the max value when the interface speed is detected as being changed (min value will be set for anything 10M or over) or when you run the included script (./scripts/tune_port.php) - see [RRDTune doc](../Extensions/RRDTune.md)
#### <a name="faq17"> Why do I see gaps in my graphs?</a>

View File

@@ -12,9 +12,17 @@ $hosts = str_replace('*', '%', mres($options['h']));
$ports = str_replace('*', '%', mres($options['p']));
if (empty($hosts) && empty($ports)) {
echo "-h <device hostname wildcard> Device(s) to match\n";
echo "-p <ifName widcard> Port(s) to match using ifName\n";
echo "-h <device hostname wildcard> Device(s) to match (all is a valid arg)\n";
echo "-p <ifName widcard> Port(s) to match using ifName (all is a valid arg)\n";
echo "\n";
exit;
}
if ($hosts == 'all') {
$hosts = '';
}
if ($ports == 'all') {
$ports = '';
}
foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?", array('%'.$hosts.'%')) as $device) {