Skip to content

Commit

Permalink
Remove 4/12 hour clutter
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
manuelkasper committed Sep 11, 2014
1 parent 5bf3c07 commit 77bc8aa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 2 additions & 4 deletions www/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
*/

Expand Down
13 changes: 1 addition & 12 deletions www/config_defaults.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
);
7 changes: 0 additions & 7 deletions www/history.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@
<?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);
Expand Down
9 changes: 2 additions & 7 deletions www/top.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
$statsfile = $interval['statsfile'];
if (@$interval['label'])
$label = $interval['label'];
if (@$interval['statslabel'])
$statslabel = $interval['statslabel'];
}
}
}
Expand All @@ -46,9 +44,6 @@
$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">
Expand Down Expand Up @@ -91,10 +86,10 @@
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)): ?>
Expand Down

0 comments on commit 77bc8aa

Please sign in to comment.