]>
git.ipfire.org Git - thirdparty/squid.git/blob - scripts/PerUser.pl
3 ## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
5 ## Squid software is distributed under GPLv2+ license and includes
6 ## contributions from numerous individuals and organizations.
7 ## Please see the COPYING and CONTRIBUTORS files for details.
10 # This is a simple script that will summarise per-user traffic
13 # Adrian Chadd <adrian@squid-cache.org>
14 # CVS-Id: PerUser.pl,v 1.2 2007/01/24 08:03:52 adrian Exp
23 if (scalar @ARGV >= 1) {
30 my $l = Squid
::ParseLog
::parse
($_);
31 if (! defined $u{$l->{$wh}}) {
32 $u{$l->{$wh}}->{"traffic"} = 0;
34 $u{$l->{$wh}}->{"traffic"} += $l->{"size"};
38 printf "%s\t\t%lu\n", $_, $u{$_}->{"traffic"};