mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add support for a wider range of link speeds when mapping links. (#7533)
Use a formula to work out link speed on network map, rather than using defined speeds.
This commit is contained in:
committed by
Tony Murray
parent
0250542d64
commit
ea477e1b28
@@ -158,18 +158,10 @@ foreach ($list as $items) {
|
||||
}
|
||||
|
||||
$speed = $items['local_ifspeed']/1000/1000;
|
||||
if ($speed == 100) {
|
||||
$width = 3;
|
||||
} elseif ($speed == 1000) {
|
||||
$width = 5;
|
||||
} elseif ($speed == 10000) {
|
||||
$width = 10;
|
||||
} elseif ($speed == 40000) {
|
||||
$width = 15;
|
||||
} elseif ($speed == 100000) {
|
||||
if ($speed > 500000) {
|
||||
$width = 20;
|
||||
} else {
|
||||
$width = 1;
|
||||
$width = round(0.77 * pow($speed, 0.25));
|
||||
}
|
||||
$link_in_used = ($items['local_ifinoctets_rate'] * 8) / $items['local_ifspeed'] * 100;
|
||||
$link_out_used = ($items['local_ifoutoctets_rate'] * 8) / $items['local_ifspeed'] * 100;
|
||||
|
||||
Reference in New Issue
Block a user