> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Dave Wombat
> Sent: Thursday, April 22, 2010 3:47 PM
> To: Simon Hobson
> Cc: [email protected]
> Subject: Re: [rrd-users] How would you handle this?
>
> On Thu, Apr 22, 2010 at 3:34 PM, Simon Hobson <[email protected]>
> wrote:
> > Ulf Zimmermann wrote:
> >>I am looking at the logs of our fax servers, which run a card by
> >>Eicon. The logfile has information like call direction, which I
> >>would want to track as in, out and total, call time (start of call),
> >>call duration and port number plus other information which for
> >>tracking purpose I don't care about.
> >>
> >>I am thinking about running a script on this to feed into RRD maybe,
> >>like once an hour to check the previous hour. But how would you
> >>organize this in RRD?
> >
> > RRD will only track rates, so you cannot use it to track individual
> > calls or their start times. You could track number of calls, and
> > total durations.
> >
> > For logging number of calls, there are two ways of doing it. One is
> > to total the calls per unit of time in your scripts, and pass this in
> > as a data type absolute. The other would be to do an update for each
> > call and feed in the value 1 for each call made/received - again data
> > type absolute and assuming you don't ever have two calls on the same
> > second.
> >
> > Similarly, for call durations, you can either add them up for each
> > time period and do an update with that total, or do an update for
> > each call.
> >
> > --
> > Simon Hobson
>
> I did something very much like what Simon describes except it was for
> PRI circuits (23 channels) and not a single FAX. The call volume
> across
> the PRI made for interesting graphs.
This is for PRIs too and as this is for fax, call lengths are different between
ports.
As a test I wrote a perl script which takes the call time (start of call) and
duration. Translate call time into seconds since epoch, then use it to fill an
associated array $count{$calltime} and in a loop doing the same for the next x
seconds based on duration. Something like:
For ($a = $calltime; $a < $calltime+$duration; $a++) {
$count{$a}++;
}
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users