pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Venkat Balaji <venkat.balaji@verse.in>
Cc: Adarsh Sharma <adarsh.sharma@orkash.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to track number of connections and hosts to Postgres cluster
Date: Wed, 24 Aug 2011 14:16:57 +0200
Message-ID: <1314188217.2193.18.camel@localhost.localdomain> (raw)
In-Reply-To: <CAFrxt0iHx14=tOXagYLKpujO3ajhiNHFc5+_k1JXM=Rzzrcygw@mail.gmail.com>
References: <CAFrxt0gk66pDOuEjB9oQJ=b1VYAeiiNDgEaFz99RhVxrecWsMg@mail.gmail.com>
	<1314172144.2193.9.camel@localhost.localdomain>
	<CAFrxt0iiQO8bBryOXRiCcW-U6NrdJepLZ_ZRXV4d+RhZziWbcA@mail.gmail.com>
	<4E54DBDE.9030000@orkash.com>
	<CAFrxt0iHx14=tOXagYLKpujO3ajhiNHFc5+_k1JXM=Rzzrcygw@mail.gmail.com>

On Wed, 2011-08-24 at 16:51 +0530, Venkat Balaji wrote:
> But, the information vanishes if the application logs off.
> 

That's why you need a tool to track this.

> I am looking for an alternative to track the total amount of the connections
> with the host IPs through a Cron job.
> 

If you only want the number of connections, you can check_postgres.
> What could be the frequency of cron ?
> 

I don't think you can go below one second.

> I know the best is using log_connections and log_disconnections parameters,
> but, information logged would be too high and is also IO intensive.
> 

Sure. But if you want connection duration, that's the only way.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com




view thread (17+ messages)  latest in thread

Message-ID: <1314188217.2193.18.camel@localhost.localdomain>
Permalink:  ../1314188217.2193.18.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1314188217.2193.18.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: guillaume@lelarge.info, venkat.balaji@verse.in, adarsh.sharma@orkash.com
  Subject: Re: How to track number of connections and hosts to Postgres cluster
  In-Reply-To: <1314188217.2193.18.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox