Uptime logging with (maybe) ppp's log functionality
Wojciech Puchar
wojtek at wojtek.tensor.gdynia.pl
Mon Dec 15 09:50:32 PST 2008
>
> 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
More information about the freebsd-questions
mailing list