From owner-freebsd-hackers Mon Oct 11 8:14:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from arnold.neland.dk (mail.neland.dk [194.255.12.232]) by hub.freebsd.org (Postfix) with ESMTP id D430D150AF; Mon, 11 Oct 1999 08:14:22 -0700 (PDT) (envelope-from leif@neland.dk) Received: from gina (gina.neland.dk [192.168.0.14]) by arnold.neland.dk (8.9.3/8.9.3) with SMTP id RAA58245; Mon, 11 Oct 1999 17:14:13 +0200 (CEST) (envelope-from leif@neland.dk) Message-ID: <014801bf13fb$5225ef00$0e00a8c0@neland.dk> From: "Leif Neland" To: "Brian F. Feldman" Cc: References: Subject: Sv: mrtg, user-ppp Date: Mon, 11 Oct 1999 17:14:23 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----- Original Message -----=20 From: Brian F. Feldman To: Leif Neland Cc: Sent: Sunday, October 10, 1999 3:49 PM Subject: Re: mrtg, user-ppp > On Sun, 10 Oct 1999, Leif Neland wrote: >=20 > > I'd like to plot uptime and number of calls from ppp to mrtg. > >=20 > > Any 'easy' way to ask ppp for these values, getting the answer for = number > > of seconds online since last asked? > >=20 >=20 > 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 >=20 > > Leif > >=20 >=20 > --=20 > Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! = / > green@FreeBSD.org `------------------------------' >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message