These are different issues. The time online is usually monitored by your login (radius) server. The bandwidth is available from you squid logs, but need to be mapped back from IP to username (once again your radius server, complicated by dynamic IPs).
will give you the total bandwidth used by each IP for your entire log rotation period, so it is not like the data is hard to get. You can estimate the time online from the squid logs but you have to kludge and assume that activity within X time units represents being online for that period. Most people are more interested in the fact that someone is tying up one of the modem pool rather than activity per se when it comes to hours.perl -ne '($ip,$bytes)=(split)[0,-1];$h{$ip}+=$bytes;END{print "$_\t$h +{$_}\n" for keys %h}' access_log*
cheers
tachyon
In reply to Re: squid-billing
by tachyon
in thread squid-billing
by ralijani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |