Remove 4/12 hour clutter

* clarify extractstats
* remove 4/12 hour stats as it’s unnecessary clutter, and by default
there is only a 24 hours stats file so the sort order and the aggregate
stats are wrong anyway, and besides the RRD resolution is too low by
default. If users want this, they can add it properly now.
This commit is contained in:
Manuel Kasper 2014-09-11 15:24:58 +02:00
parent 5bf3c07994
commit 77bc8aa73f
5 changed files with 6 additions and 31 deletions

View File

@ -264,7 +264,7 @@ Installation
`rrd-extractstats.pl /path/to/rrd/dir /path/to/knownlinks /path/to/asstats_day.txt`
That script will go through all RRD files and collect per-link summary
stats for each AS, sort them by total traffic (descending), and write them
stats for each AS in the last 24 hours, sort them by total traffic (descending), and write them
to a text file. The "top N AS" page uses this to determine which ASes to
show.

View File

@ -42,14 +42,12 @@ $customlinks = array(
$top_intervals[] = array(
'hours' => 7*24,
'statsfile' => '/data/as-stats/asstats_week.txt',
'label' => '1 week',
//'statslabel' => '1 week' // overrides display of "... in the last ..." - use if 'hours' parameter does not correspond with statsfile interval
'label' => '1 week'
);
$top_intervals[] = array(
'hours' => 30*24,
'statsfile' => '/data/as-stats/asstats_month.txt',
'label' => '30 days',
//'statslabel' => '30 days' // overrides display of "... in the last ..." - use if 'hours' parameter does not correspond with statsfile interval
'label' => '30 days'
);
*/

View File

@ -27,17 +27,6 @@ $showpeeras = false;
$top_intervals = array(
array(
'hours' => 24,
'label' => '24 hours',
'statslabel' => '24 hours'
),
array(
'hours' => 4,
'label' => '4 hours',
'statslabel' => '24 hours'
),
array(
'hours' => 12,
'label' => '12 hours',
'statslabel' => '24 hours'
'label' => '24 hours'
)
);

View File

@ -54,13 +54,6 @@ $rrdfile = getRRDFileForAS($as, $peerusage);
<?php if (!file_exists($rrdfile)): ?>
<p>No data found for AS <?php echo $as; ?></p>
<?php else: ?>
<div class="title">4 Hourly</div>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 4 * 3600, time(), $peerusage, 'hourly graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 4 * 3600, time(), $peerusage, 'hourly graph', 'detailgraph2', true);
?>
<div class="title">Daily</div>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 24 * 3600, time(), $peerusage, 'daily graph', 'detailgraph', true);

View File

@ -27,8 +27,6 @@ else {
$statsfile = $interval['statsfile'];
if (@$interval['label'])
$label = $interval['label'];
if (@$interval['statslabel'])
$statslabel = $interval['statslabel'];
}
}
}
@ -46,9 +44,6 @@ if (@$_GET['numhours']) {
$label = "24 hours";
}
if (!$statslabel)
$statslabel = $label;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -91,10 +86,10 @@ $class = (($i % 2) == 0) ? "even" : "odd";
AS<?php echo $as; ?>: <?php echo $asinfo['descr']; ?>
</div>
<div class="small">IPv4: ~ <?php echo format_bytes($nbytes[0]); ?> in /
<?php echo format_bytes($nbytes[1]); ?> out in the last <?=$statslabel?></div>
<?php echo format_bytes($nbytes[1]); ?> out in the last <?=$label?></div>
<?php if ($showv6): ?>
<div class="small">IPv6: ~ <?php echo format_bytes($nbytes[2]); ?> in /
<?php echo format_bytes($nbytes[3]); ?> out in the last <?=$statslabel?></div>
<?php echo format_bytes($nbytes[3]); ?> out in the last <?=$label?></div>
<?php endif; ?>
<?php if (!empty($customlinks)): ?>