[squid-users] SQUID Logrotate problem

2011-07-18 Thread Railic Njegos
Hi all,
i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't work
on two proxy servers. I have installed :

squid-2.6.STABLE21-6.el5
logrotate-3.7.4-9.el5_5.2

On first server , squid logs never rotated, config is here

cat /etc/logrotate.d/squid
/var/log/squid/access.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}
/var/log/squid/cache.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}

/var/log/squid/store.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
postrotate
  /usr/sbin/squid -k rotate
endscript
}

On second server squid logs rotated every day . Config :

/var/log/squid/access.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}
/var/log/squid/cache.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}

/var/log/squid/store.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
postrotate
  /usr/sbin/squid -k rotate
endscript
}

Before upgrade i have this  config and all working nice.
Can someone help me ?


[squid-users] blocking hotmail but with some exceptions

2011-07-18 Thread a bv
Hi,

I would like to block hotmail.com and some other web mail sites at
squid  and im exactly blocking them using  regex. But some sites wants
users email adress for login intothe site and uses this email address
at  the returning URL an
and when a user uses his hotmail.com or other banned web email domains
the user cant reach the sites he/she wants to reach (for example it
happens mucj when someone tries to reach to the linkedin.)

So what is the best way to block hotmail etc access generally but
allow other kind of access?.


acl webmail   url_regex hotmail.com


acl deny webmail


for example tries to block the   hotmail website access

Regards


[squid-users] Tuning the cache with heavy load

2011-07-18 Thread Francesco
Hello,

i have got a Squid version 3.1.8 running on a CentOS 5.x.
Since it works for url and content filtering, in conjunction with
Dansguardian in front, for some hunderd of users, the load average of that
machine is sometimes very high (also 5.0 or 8.0...).
The biggest process is squid, both on CPUs and Memory; i noticed, by
entering top -s and press 1 - that often the system is in wait, perhaps
it waits for the disk IO subsystem to write and manage Squid's cache.

I tried to make some customization in cache tuning, thinking that the
bottleneck are disks, so i reduce the cache size.

Something is getting better, but the system is still very loaded.

Are there some general suggestions to privilege speed and not bandwidth,
for systems with very high load?

Thank you for your kind interest, cheers!
Francesco


Re: [squid-users] blocking hotmail but with some exceptions

2011-07-18 Thread E.S. Rosenberg
Have a look at the dstdomain acl type, it is highly recommended to
only use regexes where you really need them.
http://wiki.squid-cache.org/SquidFaq/SquidAcl

Regards,
Eli

2011/7/18 a bv vbavbal...@gmail.com:
 Hi,

 I would like to block hotmail.com and some other web mail sites at
 squid  and im exactly blocking them using  regex. But some sites wants
 users email adress for login intothe site and uses this email address
 at  the returning URL an
 and when a user uses his hotmail.com or other banned web email domains
 the user cant reach the sites he/she wants to reach (for example it
 happens mucj when someone tries to reach to the linkedin.)

 So what is the best way to block hotmail etc access generally but
 allow other kind of access?.


 acl webmail   url_regex hotmail.com


 acl deny webmail


 for example tries to block the   hotmail website access

 Regards



Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread John Doe
From: Railic Njegos railic.nje...@gmail.com

 i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't work
 on two proxy servers. I have installed :
 On first server , squid logs never rotated, config is here
 On second server squid logs rotated every day . Config :
 Before upgrade i have this  config and all working nice.
 Can someone help me ?

If you compare the two configuration files from your post, they are identical...
Only difference with mines is the delaycompress.

JD


Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread Railic Njegos
On Mon, Jul 18, 2011 at 12:57 PM, John Doe jd...@yahoo.com wrote:
 From: Railic Njegos railic.nje...@gmail.com

 i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't work
 on two proxy servers. I have installed :
 On first server , squid logs never rotated, config is here
 On second server squid logs rotated every day . Config :
 Before upgrade i have this  config and all working nice.
 Can someone help me ?

 If you compare the two configuration files from your post, they are 
 identical...
 Only difference with mines is the delaycompress.

 JD


I know. But before upgrade this configuration working. But, they are
behave diferently
after upgrade. In other word,  no one now is not working well.

Njegos


Re: [squid-users] Streaming video content (e.g. BBC news to flash based player) - always stops?

2011-07-18 Thread Karl Pielorz



--On 08 July 2011 12:47 -0300 Marcus Kool marcus.k...@urlfilterdb.com 
wrote:



Well, I still would like to know the URL because I like to observe
which set of URLs this eventually triggers.
I block with a URL filter some tracker URLs: URLs which are
unnecessary for showing video content but show the content provider
what you are doing.  Sometimes these trackers cause hickups.


Any URL on the BBC news site which streams video will do it - e.g.

 http://www.bbc.co.uk/news/world-europe-14182135

If you're lucky you can watch it all the way through - most times it stops 
after a seemingly random amount of time, and displays the twirling 
buffering logo. You might also then get something like This content 
doesn't seem to be working - try again later.


Bypass squid and it works every time - right to the end.

During streaming the squid access log shows lots of:


1310988471.617276 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/61 - DIRECT/82.197.67.173 
application/x-fcs
1310988472.070453 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/62 - DIRECT/82.197.67.173 
application/x-fcs
1310988472.906835 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/63 - DIRECT/82.197.67.173 
application/x-fcs
1310988474.008   1102 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/64 - DIRECT/82.197.67.173 
application/x-fcs



These keep running for quite a while even if the streaming has 'stopped'.


Videos from Youtube work fine (as do most other sites) - it only appears to 
be the BBC videos that have the issue (or the BBC's iPlayer service - which 
is UK only afaik).


Looking around the Web, I did find:


http://old.nabble.com/RTMPT-fails-randomly-using-squid-proxy-td16570049.html

I did go as far as commenting out the code that handled the Suspicious 
request - double CR detected check, but that didn't make any difference 
[in fairness I'd not seen any errors logged by squid about 'suspicious' 
headers - but that thread does seem to be related to what we're at least 
seeing].


I did do some packet captures - around the time things start to play up I 
get a 'zero sized reply' error send from Squid to the client - but at this 
stage I thought I'd see if anyone else had encountered the issue...



-Karl


Re: [squid-users] Streaming video content (e.g. BBC news to flash based player) - always stops?

2011-07-18 Thread Amos Jeffries

On 18/07/11 23:36, Karl Pielorz wrote:



--On 08 July 2011 12:47 -0300 Marcus Kool marcus.k...@urlfilterdb.com
wrote:


Well, I still would like to know the URL because I like to observe
which set of URLs this eventually triggers.
I block with a URL filter some tracker URLs: URLs which are
unnecessary for showing video content but show the content provider
what you are doing. Sometimes these trackers cause hickups.


Any URL on the BBC news site which streams video will do it - e.g.

http://www.bbc.co.uk/news/world-europe-14182135

If you're lucky you can watch it all the way through - most times it
stops after a seemingly random amount of time, and displays the
twirling buffering logo. You might also then get something like This
content doesn't seem to be working - try again later.

Bypass squid and it works every time - right to the end.

During streaming the squid access log shows lots of:


1310988471.617 276 192.168.0.23 TCP_MISS/200 187 POST
http://82.197.67.173/idle/Cinmdz02zSLOejOD/61 - DIRECT/82.197.67.173
application/x-fcs
1310988472.070 453 192.168.0.23 TCP_MISS/200 187 POST
http://82.197.67.173/idle/Cinmdz02zSLOejOD/62 - DIRECT/82.197.67.173
application/x-fcs
1310988472.906 835 192.168.0.23 TCP_MISS/200 187 POST
http://82.197.67.173/idle/Cinmdz02zSLOejOD/63 - DIRECT/82.197.67.173
application/x-fcs
1310988474.008 1102 192.168.0.23 TCP_MISS/200 187 POST
http://82.197.67.173/idle/Cinmdz02zSLOejOD/64 - DIRECT/82.197.67.173
application/x-fcs


These keep running for quite a while even if the streaming has 'stopped'.


Videos from Youtube work fine (as do most other sites) - it only appears
to be the BBC videos that have the issue (or the BBC's iPlayer service -
which is UK only afaik).

Looking around the Web, I did find:


http://old.nabble.com/RTMPT-fails-randomly-using-squid-proxy-td16570049.html


I did go as far as commenting out the code that handled the Suspicious
request - double CR detected check, but that didn't make any difference
[in fairness I'd not seen any errors logged by squid about 'suspicious'
headers - but that thread does seem to be related to what we're at least
seeing].

I did do some packet captures - around the time things start to play up
I get a 'zero sized reply' error send from Squid to the client - but at
this stage I thought I'd see if anyone else had encountered the issue...


-Karl


double-CR and POST... hmm ... this bug? 
http://bugs.squid-cache.org/show_bug.cgi?id=2829 though I notice a lack 
of 4xx responses in that log trace you gave already.


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.14
  Beta testers wanted for 3.2.0.9


Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread Amos Jeffries

On 18/07/11 23:02, Railic Njegos wrote:

On Mon, Jul 18, 2011 at 12:57 PM, John Doejd...@yahoo.com  wrote:

From: Railic Njegosrailic.nje...@gmail.com


i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't work
on two proxy servers. I have installed :
On first server , squid logs never rotated, config is here
On second server squid logs rotated every day . Config :
Before upgrade i have this  config and all working nice.
Can someone help me ?


If you compare the two configuration files from your post, they are identical...
Only difference with mines is the delaycompress.

JD



I know. But before upgrade this configuration working. But, they are
behave diferently
after upgrade. In other word,  no one now is not working well.

Njegos


Please explain the part about don't work.

Multiple log files with some empty?
 * check for logfile_rotate directive. Must be set to 0 when an 
external log rotation software is used. Default if unset is 0.


Squid failing to answer query afterwards?
 * check for crashes on -k rotate in the new version

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.14
  Beta testers wanted for 3.2.0.9


Re: [squid-users] Tuning the cache with heavy load

2011-07-18 Thread Amos Jeffries

On 18/07/11 21:05, Francesco wrote:

Hello,

i have got a Squid version 3.1.8 running on a CentOS 5.x.
Since it works for url and content filtering, in conjunction with
Dansguardian in front, for some hunderd of users, the load average of that
machine is sometimes very high (also 5.0 or 8.0...).


Check your config for regex ACLs. They slow squid down. A lot. Simple 
tuning such as dstdomain instead of domain regex can raise the req/sec 
rates up easily.



The biggest process is squid, both on CPUs and Memory; i noticed, by


Squid-3 is not very efficient with CPU yet. We are still optimizing that 
down after the new feature additions. It also uses RAM cache a lot more.



entering top -s and press 1 - that often the system is in wait, perhaps
it waits for the disk IO subsystem to write and manage Squid's cache.


Very likely. Check your disk I/O stats as well.



I tried to make some customization in cache tuning, thinking that the
bottleneck are disks, so i reduce the cache size.


Okay, confirmation that disk is one of the bottlenecks for you.



Something is getting better, but the system is still very loaded.

Are there some general suggestions to privilege speed and not bandwidth,
for systems with very high load?


* AUFS cache format on CentOS. This one is specific.

* JBOD configuration spread over more disks. Avoid RAID unless you have 
high quality H/W controllers. Squid thrashes the disks with mostly 
random-access writes and byte-hit-ratio proportion of random-access reads.


* Faster disks, you can get a good +50% speed out of 15Krpm over 10Krpm 
according to the I/O benchmarks from last year.


* Possibly an SSD drive for small objects cache_dir (use min-size and 
max-size to tune).


If this is still a big problem after tuning you may want to get in touch 
with The Measurement Factory about a build of squid 3.2 with rock 
storage. That is the new replacement for COSS and does SMP support as 
well as disk backed slices.


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.14
  Beta testers wanted for 3.2.0.9


Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread Railic Njegos
On Mon, Jul 18, 2011 at 2:15 PM, Amos Jeffries squ...@treenet.co.nz wrote:
 On 18/07/11 23:02, Railic Njegos wrote:

 On Mon, Jul 18, 2011 at 12:57 PM, John Doejd...@yahoo.com  wrote:

 From: Railic Njegosrailic.nje...@gmail.com

 i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't work
 on two proxy servers. I have installed :
 On first server , squid logs never rotated, config is here
 On second server squid logs rotated every day . Config :
 Before upgrade i have this  config and all working nice.
 Can someone help me ?

 If you compare the two configuration files from your post, they are
 identical...
 Only difference with mines is the delaycompress.

 JD


 I know. But before upgrade this configuration working. But, they are
 behave diferently
 after upgrade. In other word,  no one now is not working well.

 Njegos

 Please explain the part about don't work.

 Multiple log files with some empty?
  * check for logfile_rotate directive. Must be set to 0 when an external log
 rotation software is used. Default if unset is 0.

 Squid failing to answer query afterwards?
  * check for crashes on -k rotate in the new version

 Amos
 --
 Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.14
  Beta testers wanted for 3.2.0.9


On first server logs never rotated. And first log file become big.
When I rotate manually, i don't have any error.

On second server squid logs are rotated every day. Configuration
is working before upgrade and they are identical.


On first server , squid logs never rotated, config is here

cat /etc/logrotate.d/squid
/var/log/squid/access.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
}
/var/log/squid/cache.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
}

/var/log/squid/store.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
   postrotate
 /usr/sbin/squid -k rotate
   endscript
}

On second server squid logs rotated every day . Config :

/var/log/squid/access.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
}
/var/log/squid/cache.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
}

/var/log/squid/store.log {
   weekly
   rotate 5
   copytruncate
   compress
   notifempty
   missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
   postrotate
 /usr/sbin/squid -k rotate
   endscript
}

Njegos


RE: [squid-users] Tuning the cache with heavy load

2011-07-18 Thread Jenny Lee

 Hello,
 
 i have got a Squid version 3.1.8 running on a CentOS 5.x.
 Since it works for url and content filtering, in conjunction with
 Dansguardian in front, for some hunderd of users, the load average of that
 machine is sometimes very high (also 5.0 or 8.0...).
 The biggest process is squid, both on CPUs and Memory; i noticed, by
 entering top -s and press 1 - that often the system is in wait, perhaps
 it waits for the disk IO subsystem to write and manage Squid's cache.
 
cat /proc/stat
 
check for: procs_blocked
 
LA is a very misunderstood metric. It doesn't exactly correspond to the load as 
one can imagine. 
 
Any time you are above 1, there is a problem somewhere. 
 
I have a Quad Core with 2-3 squids each running at 90% CPU load per core 
constantly. Yet my LA is never more than 0.60
 
Jenny
 
  

Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread John Doe
From: Railic Njegos railic.nje...@gmail.com

 On Mon, Jul 18, 2011 at 2:15 PM, Amos Jeffries squ...@treenet.co.nz 
 wrote:
  Please explain the part about don't work.
 
  Multiple log files with some empty?
   * check for logfile_rotate directive. Must be set to 0 when an external 
 log
  rotation software is used. Default if unset is 0.
 
  Squid failing to answer query afterwards?
   * check for crashes on -k rotate in the new version
 
 On first server logs never rotated. And first log file become big.
 When I rotate manually, i don't have any error.
 
 On second server squid logs are rotated every day. Configuration
 is working before upgrade and they are identical.

1. You already posted your logrotate configuration files, so posting them a 
second time won't help (and since they are identical, only one was needed).
2. Did you check what Amos said (check your squid configuration)?

JD


Re: [squid-users] Streaming video content (e.g. BBC news to flash based player) - always stops?

2011-07-18 Thread Karl Pielorz


--On 19 July 2011 00:10 +1200 Amos Jeffries squ...@treenet.co.nz wrote:


double-CR and POST... hmm ... this bug?
http://bugs.squid-cache.org/show_bug.cgi?id=2829 though I notice a lack
of 4xx responses in that log trace you gave already.


Very similar, but like you said there's no 4xx response we see... I did 
setup a packet capture (both from Client - Squid and Squid - Server) - 
I don't have it to hand at the moment (let's just say it wasn't very 
scientific - and a bit of a hack at the time).


I do recall one of the responses Squid sent back to the client contained a 
Squid error page - the one you get for a Zero sized reply received. At 
the time I wondered if Flash would 'handle' (i.e. ignore/retry a zero sized 
reply) and just soldier on, but maybe being force-fed a whole Squid error 
page telling it it had gotten a zero-sized reply might be enough to make it 
give up.


As it's not a known (or may not) be a known issue - I'll go and setup some 
proper captures in the next couple of days and pull them apart to see 
exactly what's happening...


-Karl


Re: [squid-users] Streaming video content (e.g. BBC news to flash based player) - always stops?

2011-07-18 Thread Marcus Kool

I live in Brazil (300-400 ms) away from bbc.co.uk and use Squid 3.1.14

To get a better experience I use
tcp_recv_bufsize 40 bytes  # yes I know it is huge, can be smaller 
for you
read_ahead_gap 128 KB

Tuning the above two parameters is recommended for all.

For http://www.bbc.co.uk/news/world-europe-14182135 I do not see
http://82.197.67.173/idle/...
But I see
   http://stats.bbc.co.uk/o.gif?...

I use a URL filter to block
stats.bbc.co.uk/o.gif (redirected to a 1x1 gif)
In my experience the video stream is with much less problems if
you block the above.
I am the author of ufdbGuard, a URL filter for Squid, and of course
I also use it at home.  The software is free, you can make your own
URL catagory, put the URL stats.bbc.co.uk/o.gif in it and you
effectively block the tracking image.

Other tracking URLs are:
bbc.112.2o7.net/b/ss/...
sa.bbc.co.uk/bbc/bbc/s
b.scorecardresearch.com/b

There are many sites that use tracking URLs/gifs and they can slow
down end user experience.

Marcus


Karl Pielorz wrote:



--On 08 July 2011 12:47 -0300 Marcus Kool marcus.k...@urlfilterdb.com 
wrote:



Well, I still would like to know the URL because I like to observe
which set of URLs this eventually triggers.
I block with a URL filter some tracker URLs: URLs which are
unnecessary for showing video content but show the content provider
what you are doing.  Sometimes these trackers cause hickups.


Any URL on the BBC news site which streams video will do it - e.g.

 http://www.bbc.co.uk/news/world-europe-14182135

If you're lucky you can watch it all the way through - most times it 
stops after a seemingly random amount of time, and displays the 
twirling buffering logo. You might also then get something like This 
content doesn't seem to be working - try again later.


Bypass squid and it works every time - right to the end.

During streaming the squid access log shows lots of:


1310988471.617276 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/61 - DIRECT/82.197.67.173 
application/x-fcs
1310988472.070453 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/62 - DIRECT/82.197.67.173 
application/x-fcs
1310988472.906835 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/63 - DIRECT/82.197.67.173 
application/x-fcs
1310988474.008   1102 192.168.0.23 TCP_MISS/200 187 POST 
http://82.197.67.173/idle/Cinmdz02zSLOejOD/64 - DIRECT/82.197.67.173 
application/x-fcs



These keep running for quite a while even if the streaming has 'stopped'.


Videos from Youtube work fine (as do most other sites) - it only appears 
to be the BBC videos that have the issue (or the BBC's iPlayer service - 
which is UK only afaik).


Looking around the Web, I did find:


http://old.nabble.com/RTMPT-fails-randomly-using-squid-proxy-td16570049.html 



I did go as far as commenting out the code that handled the Suspicious 
request - double CR detected check, but that didn't make any difference 
[in fairness I'd not seen any errors logged by squid about 'suspicious' 
headers - but that thread does seem to be related to what we're at least 
seeing].


I did do some packet captures - around the time things start to play up 
I get a 'zero sized reply' error send from Squid to the client - but at 
this stage I thought I'd see if anyone else had encountered the issue...



-Karl




[squid-users] SARG: The date range passed as argument is not formatted as dd/mm/yyyy-dd/mm/yyyy

2011-07-18 Thread chinner999
Hi guys,
SARG question.

Setup
Ubuntu v10.00
Squid v2.2.7.1
Squid v3.1.6

Followed instructions here to setup SARG.  
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid to 
/var/log/squid3


sudo /usr/sbin/sarg-daily-report

I'm getting the following error.
SARG: The date range passed as argument is not formatted as 
dd/mm/-dd/mm/.



/usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d 
$YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0

Any suggestions?

Thanks.


Re: [squid-users] SARG: The date range passed as argument is not formatted as dd/mm/yyyy-dd/mm/yyyy

2011-07-18 Thread Chad Naugle
Try ISO 8601 format, -MM-DD.  SARG is somewhat buggy.

 chinner999 chinner...@gmail.com 7/18/2011 4:22 PM 
Hi guys,
SARG question.

Setup
Ubuntu v10.00
Squid v2.2.7.1
Squid v3.1.6

Followed instructions here to setup SARG. 
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid
to /var/log/squid3


sudo /usr/sbin/sarg-daily-report

I'm getting the following error.
SARG: The date range passed as argument is not formatted as
dd/mm/-dd/mm/.



/usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d
$YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0

Any suggestions?

Thanks.


Travel Impressions made the following annotations
-
This message and any attachments are solely for the intended recipient
and may contain confidential or privileged information.  If you are not
the intended recipient, any disclosure, copying, use, or distribution of
the information included in this message and any attachments is
prohibited.  If you have received this communication in error, please
notify us by reply e-mail and immediately and permanently delete this
message and any attachments.
Thank you.


Re: [squid-users] SARG: The date range passed as argument is not formatted as dd/mm/yyyy-dd/mm/yyyy

2011-07-18 Thread chinner999
No dice.  Tried your suggestion. Here are the results.

/usr/sbin/sarg-daily-report

TODAY=$(date +%/%m/%d)
YESTERDAY=$(date -date 1 day ago +%/%m/%d)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d 
$YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0


sudo /usr/sbin/sarg-daily-report

I get the following.

date: extra operand `+%/%m/%d'
Try `date --help' for more information.
SARG: The date range passed as argument is not formated as 
dd/mm/-dd/mm/.


I also tried

TODAY=$(date +%m/%d/%)
YESTERDAY=$(date -date 1 day ago +%m/%d/%)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d 
$YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0

sudo /usr/sbin/sarg-daily-report
date: extra operand `+%m/%d/%'
Try `date --help' for more information.
SARG: The date range passed as argument is not formated as 
dd/mm/-dd/mm/.


 On Mon, 18 Jul 2011 14:27:37 -0600 Chad Naugle  wrote  

Try ISO 8601 format, -MM-DD. SARG is somewhat buggy. 
 
 chinner999  7/18/2011 4:22 PM  
Hi guys, 
SARG question. 
 
Setup 
Ubuntu v10.00 
Squid v2.2.7.1 
Squid v3.1.6 
 
Followed instructions here to setup SARG. 
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid 
to /var/log/squid3 
 
 
sudo /usr/sbin/sarg-daily-report 
 
I'm getting the following error. 
SARG: The date range passed as argument is not formatted as 
dd/mm/-dd/mm/. 
 
 
 
/usr/sbin/sarg-daily-report 
 
TODAY=$(date +%d/%m/%Y) 
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y) 
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d 
$YESTERDAY-$TODAY 
/usr/sbin/squid3 -k rotate 
exit 0 
 
Any suggestions? 
 
Thanks. 
 
 
Travel Impressions made the following annotations 
- 
This message and any attachments are solely for the intended recipient 
and may contain confidential or privileged information. If you are not 
the intended recipient, any disclosure, copying, use, or distribution of 
the information included in this message and any attachments is 
prohibited. If you have received this communication in error, please 
notify us by reply e-mail and immediately and permanently delete this 
message and any attachments. 
Thank you. 



Re: [squid-users] SARG: The date range passed as argument is not formatted as dd/mm/yyyy-dd/mm/yyyy

2011-07-18 Thread Amos Jeffries

chinner999  7/18/2011 4:22 PM 

Hi guys,
SARG question.

Setup
Ubuntu v10.00
Squid v2.2.7.1
Squid v3.1.6

Followed instructions here to setup SARG.
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid
to /var/log/squid3


sudo /usr/sbin/sarg-daily-report

I'm getting the following error.
SARG: The date range passed as argument is not formatted as
dd/mm/-dd/mm/.



/usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d
$YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0

Any suggestions?



Run the date command manually by itself and see what it is producing. 
Perhapse follow its helpfule message and use --help to find a format 
token that will work.


Amos


Re: [squid-users] SQUID Logrotate problem

2011-07-18 Thread Amos Jeffries

On Mon, 18 Jul 2011 15:28:54 +0200, Railic Njegos wrote:
On Mon, Jul 18, 2011 at 2:15 PM, Amos Jeffries squ...@treenet.co.nz 
wrote:

On 18/07/11 23:02, Railic Njegos wrote:


On Mon, Jul 18, 2011 at 12:57 PM, John Doejd...@yahoo.com  wrote:


From: Railic Njegosrailic.nje...@gmail.com

i have problem, after uprade CentOS 5.5 to 5.6, Logrotate don't 
work

on two proxy servers. I have installed :
On first server , squid logs never rotated, config is here
On second server squid logs rotated every day . Config :
Before upgrade i have this  config and all working nice.
Can someone help me ?


If you compare the two configuration files from your post, they 
are

identical...
Only difference with mines is the delaycompress.

JD



I know. But before upgrade this configuration working. But, they 
are

behave diferently
after upgrade. In other word,  no one now is not working well.

Njegos


Please explain the part about don't work.

Multiple log files with some empty?
 * check for logfile_rotate directive. Must be set to 0 when an 
external log

rotation software is used. Default if unset is 0.

Squid failing to answer query afterwards?
 * check for crashes on -k rotate in the new version

Amos
--
Please be using
 Current Stable Squid 2.7.STABLE9 or 3.1.14
 Beta testers wanted for 3.2.0.9



On first server logs never rotated. And first log file become big.
When I rotate manually, i don't have any error.


Sounds like the problem is in logrotate. The squid -k rotate with 
logfile_rotate 0 just closes the logs and reopens whatever is now using 
the filenames. logrotate is fully responsible for moving the file and 
creating a new one ready for the squid re-open to shift to.


Check for file permissions.

Amos