Re: [squid-users] Re: is there any thing wrong from cache manager logs ?!!

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Fri, 08 Nov 2013 02:29:31 +0200

OK so the next step since I didn't noticed couple things(IPV6 bindings)

On 11/08/2013 01:21 AM, Dr.x wrote:
> anyway , ive made another test
> before the degredation , 1st 5 minutes of squid
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |wc -l
> 3398
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep UDP |wc -l
> 6
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep ESTABLISHED |wc -l
> 3134
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep TIME_WAIT |wc -l
> 0
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep CLOSE_WAIT |wc -l
> 1
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep LISTEN |wc -l
> 8
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep ":53" |wc -l
> 73
> [root_at_squid ~]# cat /tmp/tmp_lsof.1 |grep ":3129" |wc -l
> 5
A small thing:
The above last line did not made any sense to me since there is no
possible way for 3k established connections while only 5 of them are
sockets for tproxy..

SO The lsof command(from before) is showing only ipv4 sockets which are
probably the outgoing connections from squid towards the net..
Change it to show all TCP connections like this:
##START
lsof -u squid -a -i TCP -n -P >/tmp/tmp_lsof.1
cat /tmp/tmp_lsof.1 |wc -l
cat /tmp/tmp_lsof.1 |grep UDP |wc -l
cat /tmp/tmp_lsof.1 |grep ESTABLISHED |wc -l
cat /tmp/tmp_lsof.1 |grep TIME_WAIT |wc -l
cat /tmp/tmp_lsof.1 |grep CLOSE_WAIT |wc -l
cat /tmp/tmp_lsof.1 |grep ":80" |wc -l
cat /tmp/tmp_lsof.1 |grep LISTEN |wc -l
cat /tmp/tmp_lsof.1 |grep ":TPROXYPORT" |wc -l
##END
(TPROXYPORT IS the port from squid.conf)

Which maybe will show more info..
If you want to see how many TCP FD are being used on the whole system use:
##END
lsof -i TCP -n -P >/tmp/tmp_lsof.2
cat /tmp/tmp_lsof.2 |wc -l
cat /tmp/tmp_lsof.2 |grep UDP |wc -l
cat /tmp/tmp_lsof.2 |grep ESTABLISHED |wc -l
cat /tmp/tmp_lsof.2 |grep TIME_WAIT |wc -l
cat /tmp/tmp_lsof.2 |grep CLOSE_WAIT |wc -l
cat /tmp/tmp_lsof.2 |grep LISTEN |wc -l
cat /tmp/tmp_lsof.2 |grep ":80" |wc -l
cat /tmp/tmp_lsof.2 |grep ":TPROXYPORT" |wc -l
##END

These lines have a small addition which can help understand the
situation a bit more.

Since you do have about 3k connections
Received on Fri Nov 08 2013 - 00:30:07 MST

This archive was generated by hypermail 2.2.0 : Fri Nov 08 2013 - 12:00:20 MST