From owner-freebsd-questions@FreeBSD.ORG Mon Feb 7 21:30:30 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82F2F106564A for ; Mon, 7 Feb 2011 21:30:30 +0000 (UTC) (envelope-from cmyk777@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 12E258FC1A for ; Mon, 7 Feb 2011 21:30:29 +0000 (UTC) Received: by bwz12 with SMTP id 12so5304878bwz.13 for ; Mon, 07 Feb 2011 13:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=2xIthvKBqX8uRDZw6tuvrBd91hmMxdyzThKd5fZ2d+A=; b=nRCpxgYgUjLukZDcTkjl0QyAgdtaVK582LZaMYqel0/EU96ZXDGE0h/NM4DB3YAtmX 68t++t46FiAQ5tnMPS57/55c/ncBM46jB2GFwqiiM4v58ENKYDhDBwCVogQKmaqDKGhf Y46fFXkAN3RJiVw+3nnQagAQ7uBYYt2Vy8zns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=CNdPkvXyJ4LjoX5oOWKaBfQXyPgionlFSIQEJZC/leXRMMI0KJf//QIJH/mAcfZOQ5 4AW0ZPUo9v32OIWHWIO+LoND0DBrn43QQ9supGiumf0hbOSfsyqxu8rTEfUTaL2Mldg3 LRku3PaxjqP7zo46jKzY1BRXSBqwouOSQEyII= Received: by 10.204.77.196 with SMTP id h4mr16291704bkk.89.1297112521622; Mon, 07 Feb 2011 13:02:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.231.132 with HTTP; Mon, 7 Feb 2011 13:01:41 -0800 (PST) From: Igor Prokopenkov Date: Mon, 7 Feb 2011 23:01:41 +0200 Message-ID: To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How to count number of connections from nginx workers to php-cgi unix socket? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 21:30:30 -0000 I need to count number of connections to php's cgi unix socket (created with spawn-fci). When nginx initiates a connection to cgi socket one of spawned php processes accepts this connection, processes input and outputs data. But number of processes is limited and i want to be able to monitor amount of free processes. I tried all available tools (netstat, sockstat even lsof) but it seems there is no way to determine how many active connections from nginx to unix socket. Please advise. -- Best regards, Igor Prokopenkov Zend Certificied Engineer http://zend.com/zce.php?c=ZEND010909 http://linkedin.com/in/igorprokopenkov