[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: PPP logging.. [HelP!]

At 23:35 2000-02-23 +1100, Jamie Carl wrote:
>I really need help with this one.  I need to know if there is a way
>to closely monitor how much a user downloads over a ppp connection.
>At the moment I have pppd logging out to a file in which it dumps 
>the amount downloaded, time online, etc...  Then i tried using
>pppParse to read it, but it craps out when the file is too large
>and i can't make the file any smaller.

If pppParse does not use perl, then you should try perl. If it's still to
large, you could have an hourly cron job that uses perl to extract the data
from the log and put it in a database.

Getting a summary using SQL then becomes almost trivial. This is the way
I'd do it. I find it easier to generate ad hoc reports with SQL than by
writing scripts. Something like this would not be as simple using perl,
gawk/awk, or shell scripts:

psql -c "SELECT userid,SUM(amount),SUM(minutes) FROM stats WHERE end_date
>= '2000-01-01' AND end_date <= '2000-01-31' GROUP BY userid;" -d pppstats

 Anthony E. Greene <agreene pobox com>
 Homepage and PGP Key: <http://www.pobox.com/~agreene/>
 If it's too good to be true, it's probably Linux

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]