<: $height = 3; $gb = 1024; @monthname = ("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "Sepember", "Oktober", "November", "Dezember"); $dir = "/org/infodrom.org/RRD/traffic"; # Investigate the files, the last value will stay # @files = glob ("$dir/[12][0-9][0-9][0-9]-[0-9][0-9].sum"); foreach $f (@files) { $f =~ /(\d+)-(\d+).sum/; $index = sprintf ("%d-%d", $1, $2); $years{$1}++; if (open (F, $f)) { while () { next if (/^#/); if (/(\d+) (\d+) (\d+)/) { $in = $1; $out = $2; $sum = $3; $in{$index} = $1 / $gb; $out{$index} = $2 / $gb; $sum{$index} = $3 / $gb; } } close (F); } } foreach $year (reverse sort keys %years) { printf "

%d

", $year; print "
\n"; print "\n"; $month=0; while ($month <= $#monthname) { $index = sprintf ("%d-%d", $year, $month+1); if ($sum{$index}) { printf ""; } else { print ""; } $month++; } print "\n"; print "\n"; $month=0; while ($month <= $#monthname) { printf "", $monthname[$month]; $month++; } print "\n"; print "
\">%d GB
", $sum{$index}; printf "\"\"
", $root_prefix, $out{$index} * $height if ($out{$index}); printf "\"\"
", $root_prefix, $in{$index} * $height if ($in{$index}); print "
 
\">%s
\n"; } :>

#

No graphs available on this host. "> # Local variables: # mode: indented-text # mode: auto-fill # end: