RE: [Bubba-users] Using Max(in, out)
Brought to you by:
slarti71
|
From: Todd A. G. <sla...@aw...> - 2003-06-09 13:38:40
|
On Sat, 2003-06-07 at 20:02, Steven J. Surdock, PE wrote:
> It IS fairly inefficient. If you have many clients it may take a while. It
> basically creates a list of clients then try's to calc the percentile for
> each client for yesterday then for the month and present that data in a
> table.
>
> I only have 1/2 a dozen so it takes only 15 seconds or so.
>
> On the "uninitialized value" problem, it appears some data is empty. I am a
> little confused about the data though. It appears that
> %{$rates_ref->{$interface}} has the keys of 5 min RRD timestamps. Then
> %{$rates_ref->{$interface}->$key} has the keys of timestamp, out, in, total.
> It seems odd that each timestamp has an element of 'timestamp'=>value.
Not really. It's so that if the timestamp 'record' gets separated from
the hash you can still figure out what it's timestamp was.
$rate_ref = {
'timestamp' => '12039911',
'in' => '2342341',
'out' => '53512',
};
$rates_ref->{$interface}->{$rate_ref->{'timestamp'}} = $rate_ref;
> I'm still not sure why some elements are empty...
Only reason that comes to mind is that there is no data for that
timestamp in the original RRD file. Without looking at the RRD data for
that period I couldn't tell you.
>
> -Steve S.
>
> -----Original Message-----
> From: Todd A. Green [mailto:sla...@aw...]
> Sent: Wednesday, June 04, 2003 2:08 PM
> To: Steve Surdock
> Subject: Re: [Bubba-users] Using Max(in, out)
>
>
> What's the procedure for running this script. Other than a view changes to
> see where my index directory was is there anything I need to pass it? I
> have a number of clients/interfaces and it just churns away...
>
> On Wed, 2003-06-04 at 09:35, Steven J. Surdock, PE wrote:
> > Todd,
> >
> > I've been playing with an html-based text report and the Max(in, out)
> > feature and am receiving some warnings...
> >
> > ---
> > Use of uninitialized value in numeric comparison (<=>) at
> > ./report-html.cgi line 810.
> > ---
> >
> > It appear to be a result of the 'sort' function. Any insight?
> >
> > ---
> > sub calc_percentiles {
> > ...
> > if ($interface ne 'exclude_ranges') {
> > if (lc($Global::Percentile_Calc) eq 'max(in,out)') {
> > my $calc_rate_ref = {};
> > my $percentile_rate = '';
> > foreach my $field ('in','out') {
> > my @samples = sort { $a->{$field} <=>
> > $b->{$field} } values
> > %{$rates_ref->{$interface}};
> >
> > I have attached the HTML summary report generator for your enjoyment.
> >
> > -Steve S.
--
Todd A. Green <sla...@aw...>
|