Re: Uptime logging with (maybe) ppp's log functionality
On Monday 15 December 2008 15:09:31 Polytropon wrote: > Hi! > > 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? > > Furthermore, are there already tools that, for example, would use > the daily, weekly or monthly periodic jobs to inform via mail about > how much online time was spent? Or, in addition, how much money > this would mean (built-in calculation)? If it doesn't already exist, > I'm sure I'll code it. :-) Radius was created for this (accounting and authentication based on accounting) and ppp supports it. Might as well use it ;) From ppp(8): Supports RADIUS (rfc 2138 & 2548) authentication. An extension to PAP and CHAP, Remote Access Dial In User Service allows authentication infor- mation to be stored in a central or distributed database along with vari- ous per-user framed connection characteristics. If libradius(3) is available at compile time, ppp will use it to make RADIUS requests when configured to do so. -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Uptime logging with (maybe) ppp's log functionality
Many thanks for your ideas. I think I'll use #2 and have start and stop time recorded in epoch format (because its easy to get the substraction result instead of fiddling around with date's ymdhms parameters). This is because I'm not very familiar with ppp's logs, and maybe they provide the needed information in a way that makes it hard to do calculations on it (like, say, the date format from the syylog entries). If the documentation of ppp doesn't answer all upcoming questions, I'd be glad to ask again. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Uptime logging with (maybe) ppp's log functionality
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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Uptime logging with (maybe) ppp's log functionality
Hi! 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? Furthermore, are there already tools that, for example, would use the daily, weekly or monthly periodic jobs to inform via mail about how much online time was spent? Or, in addition, how much money this would mean (built-in calculation)? If it doesn't already exist, I'm sure I'll code it. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"