mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
add port_id to sql statement
This commit is contained in:
parent
1f903af464
commit
48d8b3f09c
@ -22,7 +22,7 @@ if (empty($hosts) && empty($ports)) {
|
||||
|
||||
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) {
|
||||
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']);
|
||||
rrdtool_tune('port',$rrdfile,$port['ifSpeed']);
|
||||
|
Loading…
Reference in New Issue
Block a user