Joel Taqueban wrote:
>
> With Linux, when 'who' is issued you already know how many users are
> currently logged in. With Squid, how should I determine or know the
> users currently accessing the web via the proxy". Sorry for being
> stubborn but I am a newbie to this thing. hope for your
> understanding...
Well, using the same semantics, HTTP logs in and then out again, for
each and every request(that's every page or image in a page), if you are
using proxy-authentication to identify the users. If you aren't using
proxy-authentication, there is no user information at all.
If you're not using proxy authentication, the best you could hope for is
to count the number of addresses over a range of requests, such as:
tail -300 /squid/logs/access.log | cut -c22- | cut -d' ' -f1 | sort |
uniq | wc -l
which will give you the number of unique ip addresses that issued
requests for the last 300 requests.
If you _are_ using proxy auth, a similar command can pull the ident
field out, sort and count it.
Since each users' `login` to the proxy ends as soon as the requested
item is delivered, I'm not sure that you're going to do much better than
that.
D
Received on Mon Mar 29 1999 - 01:14:09 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:28 MST