Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B7AE6632F91 for ; Mon, 9 Aug 2010 19:39:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90457-01 for ; Mon, 9 Aug 2010 22:39:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 5D23E632BC8 for ; Mon, 9 Aug 2010 19:39:23 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 9B0AD34803D; Mon, 9 Aug 2010 15:39:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RUUivBAa28KK; Mon, 9 Aug 2010 15:39:19 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-29-207.bk17-dsl.surnet.cl [190.95.29.207]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 1C381348002; Mon, 9 Aug 2010 15:39:19 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 338D36E7FB; Mon, 9 Aug 2010 18:39:16 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: "Tomeh, Husam" , "pgsql-admin@postgresql.org" Subject: Re: High-water Mark for number of sessions/connections reached in Postgres From: Alvaro Herrera To: Scott Marlowe In-reply-to: References: Date: Mon, 09 Aug 2010 18:39:16 -0400 Message-Id: <1281393490-sup-5210@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.5 tagged_above=-10 required=5 tests=BAYES_05=-0.5 X-Spam-Level: X-Archive-Number: 201008/59 X-Sequence-Number: 35308 Excerpts from Scott Marlowe's message of lun ago 09 18:29:58 -0400 2010: > If you want a date stamp, you can change the ps ax stuff to look like this: > > date +"%Y-%m-%d %H:%M:%S"|tr "\n" ":";ps ax|grep postgres:|grep -v grep|wc -l FWIW the "grep" business is best solved by ps itself, something like ps ax -C postgres date +"%Y-%m-%d %H:%M:%S"|tr "\n" ":";ps ax -C postgres|wc -l -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support