mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This reverts commit e5dad7a64e
.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
$init_modules = array();
|
||||
require realpath(__DIR__ . '/..') . '/includes/init.php';
|
||||
|
||||
rrdtool_initialize();
|
||||
|
||||
$options = getopt('h:p:');
|
||||
|
||||
$hosts = str_replace('*', '%', mres($options['h']));
|
||||
@@ -28,8 +30,8 @@ foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostna
|
||||
foreach (dbFetchRows("SELECT `port_id`,`ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?", array('%'.$ports.'%',$device['device_id'])) as $port) {
|
||||
echo "Tuning port " . $port['ifName'].".......\n";
|
||||
$rrdfile = get_port_rrdfile_path($device['hostname'], $port['port_id']);
|
||||
Rrd::tune('port', $rrdfile, $port['ifSpeed']);
|
||||
rrdtool_tune('port', $rrdfile, $port['ifSpeed']);
|
||||
}
|
||||
}
|
||||
|
||||
Rrd::close();
|
||||
rrdtool_close();
|
||||
|
Reference in New Issue
Block a user