# squid real-time analysis

## astano

Hi,

I using squid for my connections (about 10 users) and I would like to have some real-time information about the users, like the actual transfer rate for each one...

Can anyone point me a script or some other squid add-on that can do this??

Thanks for your help!

----------

## Mythos

Hi there i use sarg to have stats about users that pass trough proxy .

```
emerge sarg
```

Here are my conf :

```
language Portuguese

access_log /var/log/squid/access.log

title "Registo de acessos no XPTO"

font_face Arial

header_color darkblue

header_bgcolor blanchedalmond

header_font_size -1

background_color white

text_color black

text_bgcolor beige

title_color green

logo_image none

logo_text ""

logo_text_color black

image_size 80 45

background_image none

temporary_dir /tmp

output_dir /chama

output_email none

resolve_ip yes

user_ip yes

topuser_sort_field BYTES reverse

user_sort_field BYTES reverse

exclude_hosts 192.168.100.253 192.168.100.204

useragent_log /var/log/squid/user-agent.log

date_format e

per_user_limit none

lastlog 0

remove_temp_files yes

index yes

overwrite_report yes

records_without_userid ip

use_comma no

topsites_num 1000

topsites_sort_order BYTES D

index_sort_order D

max_elapsed 0

max_elapsed 28800000

report_type topsites sites_users users_sites date_time denied auth_failures site_user_time_date

date_time_by bytes

charset Latin1

privacy no

privacy_string "***.***.***.***"

privacy_string_color blue

show_successful_message yes

show_read_statistics yes

topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE

user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE

topuser_num 0

site_user_time_date_type table

datafile_delimiter ";"

datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed

weekdays 0-6

hours 0-23

show_sarg_info yes

parsed_output_log_compress /bin/gzip

displayed_values abbreviation
```

----------

## Captain_Loser

Sarg is good, but if you are looking for a console interface check out squidview. Squidview isn't in portage, but its homepage is here. http://www.rillion.net/squidview/

----------

## astano

Thanks for the quick reply, but I was looking for something like

userA ==> 17,8 Kbps

userB ==> 3,5 Kbps

So I could get a snapshot of each user traffic at that moment...

----------

## Mythos

Well i put individual bandwith limit in squid so i don't need to know who is getting more bandwith ... what i need is at the end of the mouth, know exacly how much traffic was spent...

----------

