[squid-users] how to obtain info about actual active downloads?

Frantisek Hanzlik franta at hanzlici.cz
Tue Oct 28 23:57:57 UTC 2014


Leonardo Rodrigues wrote:
> On 27/10/14 11:47, Antony Stone wrote:
>> On Monday 27 October 2014 at 14:32:39 (EU time), Frantisek Hanzlik wrote:
>>
>>> Please, what is best way for determining who squid clients (their
>>> PC IP addresses) have which downloads active?
>>> I want it to determine which clients burden our slow internet line.
>>> Examining 'access.log' does not help much in this case, because users
>>> can download large files and it may take a few minutes or hours (e.g.
>>> in case of consuming some audio/video streams).
>> I would use the tool 'iptraf', either running on your squid server, or on a
>> machine which can sniff your internal network traffic (possibly with the
>> use of a
>> spanning port on the switch).
>>
>> That can give you real-time bandwidth measurements per IP address.

Hi Antony,
thanks for reply. I know and use iptraf[-ng], but in this case it
isn't ideal:
- I want to use it as well as non-IT people with windos PCs, thus I
 prefer something like www interface.
- To decide whether it is legal working download or something
 inappropriate is very useful to know what URL download is.

First point could be met with something like ntop/ntopng, but for
 the second is probably necessary to inquire directly squid.


>     I use this script:
> 
> http://samm.kiev.ua/sqstat/
> 
>     Set it to auto-update on 15/15 seconds, for example, and you'll have a
> great and easy way to evaluate active connections and high bandwidth use
> connections.

Leonardo, thanks for this info and link - it is presumably exactly
what I wanted. I tried sqstat-1.20, but unfortunately last version
1.20 is ~8 years old and probably works with some older squid version
 - according to squid log, sqstat makes inquiries
"GET cache_object://localhost/active_requests"
and want "HTTP/1.0 200 OK" reply - but squid-3.3.13 now return
"HTTP/1.1 200 OK".
And even I correct this, there is still some bad, all my hosts have
IP 0.0.0.0 (on IPv4-only LAN). Maybe from squid-3.3 returned data are
different than these from older squids for what was sqstat then written.
But I'll try to play with it even more.

Franta Hanzlik



More information about the squid-users mailing list