Date: Mon, 15 Dec 2008 18:50:04 +0100 (CET) From: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> To: Polytropon <freebsd@edvax.de> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Uptime logging with (maybe) ppp's log functionality Message-ID: <20081215184718.P55852@wojtek.tensor.gdynia.pl> In-Reply-To: <20081215150931.dbc8ea64.freebsd@edvax.de> References: <20081215150931.dbc8ea64.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
>
> I'm going to setup a system with a dial-up modem for sporadic
> Internet access; a provider that charges per second online time
> is used. Is there a way ppp (which is used for dialing) can log
> the online time (or at least the connection's start and stop time)
> so the costs can be calculated?
option a:
simply make a script (say ppp-bill.sh) that will browse through logs and
search for lines indicating connection and disconnect
option b:
you may put anything to /etc/ppp/ppp.link{up,down} scripts, for example
linkup could record current time, then linkdown substract it from what
linkup recorded, multiply by price and you have logged how much each
connection cost you
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081215184718.P55852>
