----- Original Message -----
From: Brian F. Feldman <[EMAIL PROTECTED]>
To: Leif Neland <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 10, 1999 3:49 PM
Subject: Re: mrtg, user-ppp
> On Sun, 10 Oct 1999, Leif Neland wrote:
>
> > I'd like to plot uptime and number of calls from ppp to mrtg.
> >
> > Any 'easy' way to ask ppp for these values, getting the answer for number
> > of seconds online since last asked?
> >
>
> Store the time from the previous call after each call, as with a
> (non-thread-safe) "static" variable in C. You can accomplish reading the
> time up pretty reasonably using either pppctl or just working directly
> with the ppp socket in the program.
I can't seem to find an accumulated off-hook time. pppctl only lists the off-hook time
of the last call. So 3 calls of one minute will only be shown as one minute when
queryed by mrtg.
Looking into the code, no such accumulated timer exists.
I either have to write a "proxy" querying ppp every 30 secs (faster than idle
timeout), accumulating the values for mrtg to query every 5 minutes, or modify ppp
itself. Perhaps a "pppctl show mrtg", giving output directly in the format mrtg
likes...
Leif
>
> > Leif
> >
>
> --
> Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! /
> [EMAIL PROTECTED] `------------------------------'
>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message