From owner-freebsd-stable@FreeBSD.ORG Thu Jan 31 12:39:30 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18E299E4 for ; Thu, 31 Jan 2013 12:39:30 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx1.freebsd.org (Postfix) with ESMTP id D3077190 for ; Thu, 31 Jan 2013 12:39:29 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id rl6so1721339pac.1 for ; Thu, 31 Jan 2013 04:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=LUmM0rXizF+ysO6gxamvyFucOldWFz2NyRlNS1uk53o=; b=wMX07yzkZjG1wiiHL/Cu42shDYA4VX6K5i2Pnrgg/zZ9ec3pDR/EUvLsaZpi8glN9g ErPWQU5EAu6a9qmdW7qmIA6Clbk/oMrxHPhQnB1edwYjZoGBfw4Taj3TuKAAexYOwuPt wra1nxH8MSN6AXeqbdqyAGmUaXNjKrOEDHtB9g5ES3xmZI1Zp9VrBIbhbOV04p436ce/ ERAFoUgOZY08dNPIQunlUXj/pi+svkCsYSC2eR81e44fqIb1UtxQ4UWUdrN+fW01OSPO 6nJEl53UlKGqGoYK8efxVtInsyoIg1qGWIiE4IgagxJeatgf7pmhZ5OBr7bom8qcR99i lbHA== X-Received: by 10.68.235.1 with SMTP id ui1mr21708045pbc.138.1359635969239; Thu, 31 Jan 2013 04:39:29 -0800 (PST) Received: from [192.168.1.7] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPS id sg7sm4936484pbb.3.2013.01.31.04.39.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Jan 2013 04:39:27 -0800 (PST) Message-ID: <510A65F5.9070706@gmail.com> Date: Thu, 31 Jan 2013 23:39:17 +1100 From: Kubilay Kocak User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Efra=EDn_D=E9ctor?= Subject: Re: About kern.ipc.somaxconn and netstat References: <5108E720.70705@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 12:39:30 -0000 On 31/01/2013 4:54 AM, Efraín Déctor wrote: > -----Mensaje original----- From: Kubilay Kocak > Sent: Wednesday, January 30, 2013 3:25 AM > To: Efraín Déctor > Cc: freebsd-stable@freebsd.org > Subject: Re: About kern.ipc.somaxconn and netstat > > On 30/01/2013 12:26 PM, Efraín Déctor wrote: >> Hello. >> >> We have a webserver using FreeBSD, we read about tunning >> kern.ipc.somaxconn >> (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html) >> so the OS can handle all the connections. Is there a way to know how >> many connections are established in a certain moment?. I know about >> netstat(1) but is there any other command that we can use to know the >> exact amount of how many connections are established?. >> > This one might help: > > kern.ipc.numopensockets: Number of open sockets > > It's usefulness will depend on the granularity you require (in only, out > only, established only, etc) but it's always represented system-wide > resource consumption very well (matching observed workloads - baseline value>) > > > Thank you, it is very helpfull, using kern.ipc.numopensockets with > sockstat(1) and netstat(1) will give me a clue to tune kern.ipc.somaxconn > > Thank you all. Also, if you haven't already come across this one in your netstat travels, this one directly reports listen queue overflows: netstat -s -p tcp |grep listen -- Ta, Koobs