Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DSL stats even if port is down #12262

Merged
merged 6 commits into from Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions includes/html/graphs/port/adsl_attainable.inc.php
Expand Up @@ -3,12 +3,12 @@
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');

$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Downstream';
$rrd_list[0]['ds'] = 'AtucCurrAttainableR';
$rrd_list[0]['descr'] = 'Central to CPE';
$rrd_list[0]['ds'] = 'AturCurrAttainableR';

$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Upstream';
$rrd_list[1]['ds'] = 'AturCurrAttainableR';
$rrd_list[1]['descr'] = 'CPE to Central';
$rrd_list[1]['ds'] = 'AtucCurrAttainableR';

$unit_text = 'Bits/sec';

Expand Down
8 changes: 4 additions & 4 deletions includes/html/graphs/port/adsl_attenuation.inc.php
Expand Up @@ -3,12 +3,12 @@
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');

$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Downstream';
$rrd_list[0]['ds'] = 'AtucCurrAtn';
$rrd_list[0]['descr'] = 'Central to CPE';
$rrd_list[0]['ds'] = 'AturCurrAtn';

$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Upstream';
$rrd_list[1]['ds'] = 'AturCurrAtn';
$rrd_list[1]['descr'] = 'CPE to Central';
$rrd_list[1]['ds'] = 'AtucCurrAtn';

$unit_text = 'dB';

Expand Down
8 changes: 4 additions & 4 deletions includes/html/graphs/port/adsl_power.inc.php
Expand Up @@ -3,12 +3,12 @@
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');

$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Downstream';
$rrd_list[0]['ds'] = 'AtucCurrOutputPwr';
$rrd_list[0]['descr'] = 'Central';
$rrd_list[0]['ds'] = 'AturCurrOutputPwr';

$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Upstream';
$rrd_list[1]['ds'] = 'AturCurrOutputPwr';
$rrd_list[1]['descr'] = 'CPE';
$rrd_list[1]['ds'] = 'AtucCurrOutputPwr';

$unit_text = 'dBm';

Expand Down
8 changes: 4 additions & 4 deletions includes/html/graphs/port/adsl_snr.inc.php
Expand Up @@ -3,12 +3,12 @@
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');

$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Downstream';
$rrd_list[0]['ds'] = 'AtucCurrSnrMgn';
$rrd_list[0]['descr'] = 'Central to CPE';
$rrd_list[0]['ds'] = 'AturCurrSnrMgn';

$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Upstream';
$rrd_list[1]['ds'] = 'AturCurrSnrMgn';
$rrd_list[1]['descr'] = 'CPE to Central';
$rrd_list[1]['ds'] = 'AtucCurrSnrMgn';

$unit_text = 'dB';

Expand Down
4 changes: 2 additions & 2 deletions includes/html/graphs/port/adsl_speed.inc.php
Expand Up @@ -3,11 +3,11 @@
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');

$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Downstream';
$rrd_list[0]['descr'] = 'Central to CPE';
$rrd_list[0]['ds'] = 'AtucChanCurrTxRate';

$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Upstream';
$rrd_list[1]['descr'] = 'CPE to Central';
$rrd_list[1]['ds'] = 'AturChanCurrTxRate';

$unit_text = 'Bits/sec';
Expand Down
7 changes: 6 additions & 1 deletion includes/html/pages/device/port/adsl.inc.php
Expand Up @@ -2,11 +2,16 @@

if (file_exists(get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl'))) {
$iid = $id;
echo '<div class=graphhead>ADSL Line Speed</div>';
echo '<div class=graphhead>ADSL Current Line Speed</div>';
$graph_type = 'port_adsl_speed';

include 'includes/html/print-interface-graphs.inc.php';

echo '<div class=graphhead>ADSL Attainable Speed</div>';
$graph_type = 'port_adsl_attainable';

include 'includes/html/print-interface-graphs.inc.php';

echo '<div class=graphhead>ADSL Line Attenuation</div>';
$graph_type = 'port_adsl_attenuation';

Expand Down
4 changes: 2 additions & 2 deletions includes/html/print-interface.inc.php
Expand Up @@ -146,9 +146,9 @@
// adslAtucCurrAttainableRate is UploadMaxRate
echo 'Max:' . formatRates($port_adsl['adslAturCurrAttainableRate']) . '/' . formatRates($port_adsl['adslAtucCurrAttainableRate']);
echo "</td><td width=150 onclick=\"location.href='" . generate_port_url($port) . "'\" >";
echo 'Atten:' . $port_adsl['adslAtucCurrAtn'] . 'dB/' . $port_adsl['adslAturCurrAtn'] . 'dB';
echo 'Atten:' . $port_adsl['adslAturCurrAtn'] . 'dB/' . $port_adsl['adslAtucCurrAtn'] . 'dB';
echo '<br />';
echo 'SNR:' . $port_adsl['adslAtucCurrSnrMgn'] . 'dB/' . $port_adsl['adslAturCurrSnrMgn'] . 'dB';
echo 'SNR:' . $port_adsl['adslAturCurrSnrMgn'] . 'dB/' . $port_adsl['adslAtucCurrSnrMgn'] . 'dB';
} else {
echo "</td><td width=150 onclick=\"location.href='" . generate_port_url($port) . "'\" >";
if ($port['ifType'] && $port['ifType'] != '') {
Expand Down
3 changes: 2 additions & 1 deletion includes/polling/ports.inc.php
Expand Up @@ -734,8 +734,9 @@
if (! empty($port['skipped'])) {
// We don't care about statistics for skipped selective polling ports
d_echo("$port_id skipped because selective polling ports is set.");
} elseif ($port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
} elseif ($port['ifType'] != 'adsl' && $port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
// We don't care about statistics for down ports on which states did not change since last polling
// We still take into account 'adsl' ports that may update speed/noise even if the interface is status down
d_echo("$port_id skipped because port is still down since last polling.");
} else {
// End parse ifAlias
Expand Down