More updates

This commit is contained in:
laf
2015-11-17 05:38:45 -08:00
parent 253b27d403
commit 52e0be911b
4 changed files with 4 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ $rrdtool_conf = array(
'descr' => 'Path to rrdtool binary',
'type' => 'text',
),
array('name' => 'rrdtool.tune',
array('name' => 'rrdtool_tune',
'descr' => 'Tune all rrd port files to use max values',
'type' => 'checkbox',
),

View File

@@ -339,7 +339,7 @@ foreach ($ports as $port) {
$device_tune = get_dev_attrib($device,'override_rrdtool_tune');
if ($port_tune == "true" ||
($device_tune == "true" && $port_tune != 'false') ||
($config['rrdtool']['tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
($config['rrdtool_tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
if ($oid == 'ifSpeed') {
$tune_port = true;
}
@@ -487,6 +487,7 @@ foreach ($ports as $port) {
'OUTMULTICASTPKTS' => $this_port['ifOutMulticastPkts'],
);
echo "TEST $tune_port END \n";
if ($tune_port === true) {
rrdtool_tune('port',$rrdfile,$this_port['ifSpeed']);
}

View File

@@ -19,9 +19,6 @@ if (empty($hosts) && empty($ports)) {
}
echo "TEST $hosts and $ports\n";
$debug=1;
foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?", array('%'.$hosts.'%')) as $device) {
echo "Found hostname " . $device['hostname'].".......\n";
foreach (dbFetchRows("SELECT `ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?", array('%'.$ports.'%',$device['device_id'])) as $port) {

View File

@@ -1 +1 @@
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrdtool','/usr/bin/rrdtool','/usr/bin/rrdtool','Path to rrdtool','external',0,'rrdtool',0,'0','0'), ('rrdtool.tune','false','false','Auto tune maximum value for rrd port files','external',0,'rrdtool',0,'0','0');
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrdtool','/usr/bin/rrdtool','/usr/bin/rrdtool','Path to rrdtool','external',0,'rrdtool',0,'0','0'), ('rrdtool_tune','false','false','Auto tune maximum value for rrd port files','external',0,'rrdtool',0,'0','0');