On 1/22/2013 12:32 PM, Niamh Holding wrote:
Hello Kevin,
Tuesday, January 22, 2013, 12:17:31 PM, you wrote:
KAM> If you are having a division by zero error that line number doesn't match
the current code.
Where's the current version?
I'm referring to the version in SVN for trunk v3.4. You are using a
version from 3.0 but from comparing, I see nothing different except the
license. But that's enough to throw off the lines. However, I can't
find a division process. Can you look at your version and cut and paste
line 229?
However, looking at your output, it looks like you are parsing VERY
little data.
From a quick logic review, the only lines that look like they could
have divide by 0 errors are:
$aggregate_stats{'emailperhour'} =
($stats{'total'}{'count'}/$timing{'hrsinperiod'});
$aggregate_stats{'bytesperhour'} = ($stats{'total'}{'bytes'} /
$timing{'hrsinperiod'});
$aggregate_stats{'secperhour'} = ($stats{'total'}{'time'} /
$timing{'hrsinperiod'});
Try changing $timing{'hrsinperiod'} = (($timing{'end'} -
$timing{'start'}) / 3600); to
$timing{'hrsinperiod'} = (($timing{'end'} - $timing{'start'}) / 3600) || 1;
Regards,
KAM