Re: [HACKERS] keeping track of connections

Marc G. Fournier <scrappy@hub.org>

From: The Hermit Hacker <scrappy@hub.org>
To: David Gould <dg@illustra.com>
Cc: Brett McCormick <brett@work.chicken.org>, maillist@candle.pha.pa.us, pgsql-hackers@hub.org
Date: 1998-06-03T21:52:33Z
Lists: pgsql-hackers
On Wed, 3 Jun 1998, David Gould wrote:

> I am curious, what is it you are trying to accomplish with this? Are you 
> trying to build a persistant log that you can query later for billing
> or load management/capacity planning information? Are you trying to monitor
> login attempts for security auditing? Are you trying to catch logins in
> real time for some sort of middleware integration?
> 
> Here we are discussion solutions, but I don't even know what the problem
> is. So, please describe what is needed in terms of
> requirements/functionality.

	I think the uses could be many.  Keep track, on a per 'backend'
basis, max memory used during the life of the process, so that you can
estimate memory requirements/upgrades.  Average query times for the
duration of the process?  Or maybe even bring it down to a 'per query'
logging, so that you know what the query was, how long it took, and what
resources were required?  Tie that to a table of processes, maybe with a
timestamp for when the process started up and when it started.  

	Then, using a simple query, you could figure out peak times for
processes, or number of processes per hour, or...



Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org