[squid-users] retrieve amount of traffic by username

Janis Heller janis.heller at outlook.de
Tue Jun 6 13:45:53 UTC 2017


Seems like parsing would be what I need. Is the size (consumed bandwith) and the usernams (timestamp can be generated by my parser) being written to this file?
Could you show me a sample output of this file?
________________________________
Von: Alex Rousskov <rousskov at measurement-factory.com>
Gesendet: Dienstag, 6. Juni 2017 15:40:18
An: Janis Heller; squid-users at lists.squid-cache.org
Betreff: Re: [squid-users] retrieve amount of traffic by username

On 06/06/2017 06:10 AM, Janis Heller wrote:
> Is there some easy way, since I would need to store the
> generated traffic of a user per month (for being able to deny access on
> my custom backend script).

If parsing Squid access.log entries is easy for you, then there is an
easy way -- either parse the log Squid writes to disk or, as Amos,
suggested, add your own logging daemon that will parse the log entries
on the fly.


> So all I need to get is the traffic generated
> by a user when he's disconnecting.

HTTP does not have a concept of "user disconnect" beyond a single HTTP
transaction or, in some cases, a single HTTP connection. Each access log
entry is logged at the end of an HTTP transaction.

Alex.


More information about the squid-users mailing list