pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: jeanarthur@eurovox.fr
Cc: pgsql-admin@postgresql.org
Subject: Re: Requests per second ?
Date: 31 Mar 2003 08:38:36 -0500
Message-ID: <1049117916.13799.1707.camel@camel> (raw)
In-Reply-To: <3E84346A.10825.846A02@localhost>
References: <00f501c2f504$9b7e1180$0300a8c0@terra>
	<3E84346A.10825.846A02@localhost>

Don't remember what I wrote this for, but IIRC it outputs the current
transaction counter every 1 sec, which you can then use to determine the
number of transactions per second.

#!/bin/bash

while true
do sleep 1; psql -U postgres mydb -c "SELECT age(datfrozenxid) FROM
pg_database where datname='mydb'";
done;

I'm sure you can use this to come up with something more robust.

Robert Treat


On Fri, 2003-03-28 at 05:39, jeanarthur@eurovox.fr wrote:
> H,
> 
> Is there a simple way to know how many request per second
> (average) my PG database is currently handling ??
> 
> thank you !
> 
> jean-arthur silve




view thread (2+ messages)

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

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: xzilla@users.sourceforge.net, jeanarthur@eurovox.fr
  Subject: Re: Requests per second ?
  In-Reply-To: <1049117916.13799.1707.camel@camel>
  References: <00f501c2f504$9b7e1180$0300a8c0@terra> <3E84346A.10825.846A02@localhost> <1049117916.13799.1707.camel@camel>

* 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