From 7e49291cfe686a6ef8b4a766e8a1b914095f19d6 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 19 May 2005 18:34:06 +0000 Subject: New directory format and stuff --- other/tor/bin/rrd-graph | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'other/tor/bin/rrd-graph') 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 .= "

"; $html .= "

\"Fast\" means a capacity of over 20,000 bytes/second

\n"; - $html .= "

Number of routers over the last 9 months | "; - $html .= " last month |"; - $html .= " last 2 weeks

"; + $html .= "

Number of routers over the last 9 months | "; + $html .= " last month |"; + $html .= " last 2 weeks

"; }; @@ -354,9 +354,9 @@ if ($totalTraffic[0] ne 'MAGIX1' || $totalTraffic[1] ne 'MAGIX2') { warn RRDs::error if RRDs::error; $html .= "

"; - $html .= "

Bandwidth usage for last 9 months | "; - $html .= " last month |"; - $html .= " last 2 weeks

"; + $html .= "

Bandwidth usage for last 9 months | "; + $html .= " last month |"; + $html .= " last 2 weeks

"; } @@ -411,3 +411,26 @@ print F "Older Tor Routers", "Peter Palfrader <web\@palfrader.org>\n", "\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 "$imgs{$key}", + "

$imgs{$key}

", + "back", + "

", + "", + "


\n", + "


\nBuilt at $GMTIME on $HOSTNAME
\n", + "Peter Palfrader <web\@palfrader.org>\n", + "\n"; + close F; +}; -- cgit v1.2.3