From 14aca3e7a36e0ada5fc22e4322bbf7684e83bec9 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 8 Jan 2006 21:22:28 +0000 Subject: Change log view from 15 to 24 months work around state loading bug --- other/tor/bin/rrd-graph | 2 +- other/tor/bin/rrd-update | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/other/tor/bin/rrd-graph b/other/tor/bin/rrd-graph index 05a9601..32274f1 100755 --- a/other/tor/bin/rrd-graph +++ b/other/tor/bin/rrd-graph @@ -17,7 +17,7 @@ my $RRD = '/home/weasel/www/www.noreply.org/Build/other/tor/rrd/running_Routers. my $RRD_DIR = '/home/weasel/www/www.noreply.org/Build/other/tor/rrd/nodes'; my $INDEX_DIR = '/home/weasel/www/www.noreply.org/Build/other/tor/index'; my $RESULT_DIR = 'result.new'; -my $LONG_TIME_MONTHS = 15; +my $LONG_TIME_MONTHS = 24; my $VERBOSE = 0; # Get list of RRD files diff --git a/other/tor/bin/rrd-update b/other/tor/bin/rrd-update index 30e5466..9f84221 100755 --- a/other/tor/bin/rrd-update +++ b/other/tor/bin/rrd-update @@ -429,6 +429,10 @@ for my $dir (@dirfiles) { if ($v < 0) { $v += 4294967296; # work around bug in tor, that has history as signed 32 bit integer. }; + if ($v > 18446744000000000000) { + $v = $v - 2**64 + 2**32; # state loading bug, fixed 2006-01-02 + }; + #print "Setting $inout value to $v for host $hash from $dir\n"; $hist{$stamp}->{$inout} = $v; $stamp -= $interval; }; -- cgit v1.2.3