Date: Mon, 11 Oct 1999 17:14:23 +0200 From: "Leif Neland" <leif@neland.dk> To: "Brian F. Feldman" <green@FreeBSD.ORG> Cc: <freebsd-hackers@FreeBSD.ORG> Subject: Sv: mrtg, user-ppp Message-ID: <014801bf13fb$5225ef00$0e00a8c0@neland.dk> References: <Pine.BSF.4.10.9910100946540.84419-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=20 From: Brian F. Feldman <green@FreeBSD.ORG> To: Leif Neland <leifn@neland.dk> Cc: <freebsd-hackers@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?014801bf13fb$5225ef00$0e00a8c0>