Skip site navigation (1) Skip section navigation (2)

Re: How to track number of connections and hosts to Postgres cluster

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Venkat Balaji <venkat(dot)balaji(at)verse(dot)in>
Cc: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How to track number of connections and hosts to Postgres cluster
Date: 2011-08-24 12:16:57
Message-ID: 1314188217.2193.18.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-performance
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


In response to

pgsql-performance by date

Next:From: Greg SmithDate: 2011-08-24 15:33:22
Subject: Re: How to track number of connections and hosts to Postgres cluster
Previous:From: Venkat BalajiDate: 2011-08-24 11:21:14
Subject: Re: How to track number of connections and hosts to Postgres cluster

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group