Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Comment on

It would be pretty unusual to have a file name that ends with \n, so I see that as an edge case that's probably not worth worrying about.

It's probably better to have a check after the call to RRDs::info, so I've inserted:

my $info = RRDs::info "$logsdir/$rrd"; # Check to ensure we actually have a valid rrd file unless ($info->{filename}) { print qq|"$logsdir/$rrd" doesn't appear to be a valid rrd log, + skipping\n|; next; }
Which does the trick...
$ touch foo.rrd $ ./ Starting, found 1 rrd files Processing foo.rrd "./foo.rrd" doesn't appear to be a valid rrd log, skipping Finished, processed 1 files in 0.00 seconds

In reply to Re^4: Resizing MRTG (RRDTool) logs en-masse by McDarren
in thread Resizing MRTG (RRDTool) logs en-masse by McDarren

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (6)
    As of 2014-12-25 16:28 GMT
    Find Nodes?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?

      Results (160 votes), past polls