summaryrefslogtreecommitdiff
path: root/other/tor/bin/rrd-graph
diff options
context:
space:
mode:
Diffstat (limited to 'other/tor/bin/rrd-graph')
-rwxr-xr-xother/tor/bin/rrd-graph35
1 files changed, 29 insertions, 6 deletions
diff --git a/other/tor/bin/rrd-graph b/other/tor/bin/rrd-graph
index 63c5c43..bd4cc05 100755
--- a/other/tor/bin/rrd-graph
+++ b/other/tor/bin/rrd-graph
@@ -319,9 +319,9 @@ if ($params[0] ne 'MAGIX1' || $params[1] ne 'MAGIX2') {
$html .= "<p><img width=\"$xsize\" height=\"$ysize\" src=\"$IMG_URL"."total.png\"></p>";
$html .= "<p>\"Fast\" means a capacity of over 20,000 bytes/second</p>\n";
- $html .= "<p>Number of routers over the <a href=\"$IMG_URL"."total9Months.png\">last 9 months</a> | ";
- $html .= " <a href=\"$IMG_URL"."totalMonthly.png\">last month</a> |";
- $html .= " <a href=\"$IMG_URL"."totalBiWeekly.png\">last 2 weeks</a></p>";
+ $html .= "<p>Number of routers over the <a href=\"$IMG_URL"."total9Months.html\">last 9 months</a> | ";
+ $html .= " <a href=\"$IMG_URL"."totalMonthly.html\">last month</a> |";
+ $html .= " <a href=\"$IMG_URL"."totalBiWeekly.html\">last 2 weeks</a></p>";
};
@@ -354,9 +354,9 @@ if ($totalTraffic[0] ne 'MAGIX1' || $totalTraffic[1] ne 'MAGIX2') {
warn RRDs::error if RRDs::error;
$html .= "<p><img width=\"$xsize\" height=\"$ysize\" src=\"$IMG_URL"."totalTraffic.png\"></p>";
- $html .= "<p>Bandwidth usage for <a href=\"$IMG_URL"."totalTraffic9Months.png\">last 9 months</a> | ";
- $html .= " <a href=\"$IMG_URL"."totalTrafficMonthly.png\">last month</a> |";
- $html .= " <a href=\"$IMG_URL"."totalTrafficBiWeekly.png\">last 2 weeks</a></p>";
+ $html .= "<p>Bandwidth usage for <a href=\"$IMG_URL"."totalTraffic9Months.html\">last 9 months</a> | ";
+ $html .= " <a href=\"$IMG_URL"."totalTrafficMonthly.html\">last month</a> |";
+ $html .= " <a href=\"$IMG_URL"."totalTrafficBiWeekly.html\">last 2 weeks</a></p>";
}
@@ -411,3 +411,26 @@ print F "<html><head><title>Older Tor Routers</title></head><body>",
"<a href=\"mailto:web\@palfrader.org\">Peter Palfrader &lt;web\@palfrader.org&gt;</a>\n",
"</body></html>\n";
close F;
+
+
+my %imgs = (
+ total9Months => 'Number of routers over the last 9 months',
+ totalMonthly => 'Number of routers over the last month',
+ totalBiWeekly => 'Number of routers over the last 2 weeks',
+ totalTraffic9Months => 'Traffic over the last 9 months',
+ totalTrafficMonthly => 'Traffic over the last month',
+ totalTrafficBiWeekly => 'Traffic over the last 2 weeks' );
+
+for my $key (keys %imgs) {
+ open (F, ">$RESULT_DIR/$key.html") or die ("Cannot open $key.html: $!\n");
+ print F "<html><head><title>$imgs{$key}</title></head><body>",
+ "<h1>$imgs{$key}</h1>",
+ "<a href=\".\">back</a>",
+ "<p>",
+ "<img src=\"$key.png\">",
+ "<br><br><br>\n",
+ "<hr>\nBuilt at $GMTIME on $HOSTNAME<br>\n",
+ "<a href=\"mailto:web\@palfrader.org\">Peter Palfrader &lt;web\@palfrader.org&gt;</a>\n",
+ "</body></html>\n";
+ close F;
+};