--- MRTG_lib.pm	Thu Jul 26 09:13:46 2001
+++ MRTG_lib.pm.1minute_interval	Thu Jul 26 09:03:44 2001
@@ -66,7 +66,7 @@
         sub{"Less than 1 fork or not running on Unix/Linux"}],
 
        'refresh' => 
-       [sub{int($_[0]) >= 300}, sub{"$_[0] should be 300 seconds or more"}],
+       [sub{int($_[0]) >= 60}, sub{"$_[0] should be 60 seconds or more"}],
 
        'interval' => 
        [sub{int($_[0]) >= 1}, sub{"$_[0] should be at least 1 Minute"}], 
@@ -1280,8 +1280,8 @@
     my %cur;
     my %next;
     my $rrd;    
-    my @steps = qw(300 1800 7200 86400);
-    my %sizes = ( 300 => 600, 1800 => 700, 7200 => 775, 86400 => 797);
+    my @steps = qw(1 10 60 1440);
+    my %sizes = ( 1 => 1440, 10 => 1008, 60 => 768, 1440 => 797);
 
     open R, "<$$cfg{logdir}$$rcfg{'directory'}{$router}$router.log" or 
 	die "ERROR: opening $$cfg{logdir}$$rcfg{'directory'}{$router}$router.log: $!";
@@ -1333,7 +1333,7 @@
 		    $rate{$d}{$s} = $cur{$d} if $rate{$d}{$s} < $cur{$d};
 		}
 		$elapsed_time{$s} += $time_diff;
-#		print "$time $next_stop\n" if $s == 300;
+#		print "$time $next_stop\n" if $s == 60;
 		if ($next_stop == $mark{$s}-$s) {
 		    foreach my $t (qw(in out maxin maxout)){
                        $rate{$t}{$s}/=3600
@@ -1355,8 +1355,8 @@
     close R;
 
     my $DST;
-    my $pdprepin = (shift @{$store{in}{300}})*($first_step{300});
-    my $pdprepout = (shift @{$store{out}{300}})*($first_step{300});
+    my $pdprepin = (shift @{$store{in}{60}})*($first_step{60});
+    my $pdprepout = (shift @{$store{out}{60}})*($first_step{60});
 
     if (defined $$rcfg{'options'}{'absolute'}{$router}) {
 	$DST = 'ABSOLUTE'
@@ -1382,7 +1382,7 @@
 <!-- MRTG Log converted to RRD -->
 <rrd>
 	<version> 0001 </version>
-	<step> 300 </step>
+	<step> 60 </step>
 	<lastupdate> $latest_timestamp </lastupdate>
 
 	<ds>
@@ -1411,7 +1411,7 @@
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 RRD
-    $first_step{300} = 0; # invalidate
+    $first_step{60} = 0; # invalidate
     addarch(1,'AVERAGE','in','out',\%store,\%first_step,\$rrd);
     addarch(6,'AVERAGE','in','out',\%store,\%first_step,\$rrd);
     addarch(24,'AVERAGE','in','out',\%store,\%first_step,\$rrd);
@@ -1439,9 +1439,9 @@
     my $rrd = shift;
     my $cdpin = 'NaN';
     my $cdpout = 'NaN';
-    if ($steps != 300) {
-	$cdpin = shift @{$$store{$in}{300*$steps}};
-	$cdpout = shift @{$$store{$out}{300*$steps}};
+    if ($steps != 60) {
+	$cdpin = shift @{$$store{$in}{60*$steps}};
+	$cdpout = shift @{$$store{$out}{60*$steps}};
     };
     $$rrd .= <<RRD;
 <!-- Round Robin Archive -->
@@ -1457,10 +1457,10 @@
 
 		<database>
 RRD
-    while (@{$$store{$in}{$steps*300}}){
+    while (@{$$store{$in}{$steps*60}}){
         # we take zero as UNKNOWN
-	my $inr = pop @{$$store{$in}{$steps*300}} || 'NaN';
-	my $outr = pop @{$$store{$out}{$steps*300}} || 'NaN';
+	my $inr = pop @{$$store{$in}{$steps*60}} || 'NaN';
+	my $outr = pop @{$$store{$out}{$steps*60}} || 'NaN';
 	$$rrd .= <<RRD;
 	             <row><v> $inr </v><v> $outr </v></row>
 RRD
