From f3f697399ed59d7259973c24e627af4633ffc89a Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 25 Jun 2014 15:28:05 +0200 Subject: [PATCH] Revert "add a filter in find, so it will count as OR peeras, not both of them (same tree..)" This reverts commit 7920698595fa2447ec38b6f0d0dd70a9e1105c17. --- bin/rrd-extractstats.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/rrd-extractstats.pl b/bin/rrd-extractstats.pl index b8613ee..a2704ab 100755 --- a/bin/rrd-extractstats.pl +++ b/bin/rrd-extractstats.pl @@ -8,7 +8,6 @@ use strict; use RRDs; use File::Find; -use File::Find::Rule; if ($#ARGV != 2) { die("Usage: $0 outfile\n"); @@ -27,7 +26,12 @@ my @links = values %knownlinks; # walk through all RRD files in the given path and extract stats for all links # from them; write the stats to a text file, sorted by total traffic -my @rrdfiles = File::Find::Rule->maxdepth(2)->file->in($rrdpath); +my @rrdfiles; +find(sub { + if (-f $_) { + push(@rrdfiles, $File::Find::name); + } +}, $rrdpath); my $astraffic = {};