pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@gmail.com>
To: ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
Date: Fri, 7 Jul 2006 09:37:46 +0200
Message-ID: <9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com> (raw)
In-Reply-To: <20060707043738.62724.qmail@web50312.mail.yahoo.com>
References: <9e4684ce0606110810n50f8c44cjf02a273a65aac0c2@mail.gmail.com>
	<20060707043738.62724.qmail@web50312.mail.yahoo.com>

On 7/7/06, ogjunk-pgjedan@yahoo.com <ogjunk-pgjedan@yahoo.com> wrote:
>
> Interesting, Hubert.
> Where/how do you get the data for:
>   - number of transactions per second



periodically (every 5 minutes) i do:
select sum(xact_commit) + sum(xact_rollback) from pg_stat_database
and then just check against previous value, and calculate "per/second". this
is actually handled nicely by mrtg itself.


  - duration of longest query
>

select * from pg_stat_activity where current_query !~ '<IDLE>' order by
query_start asc limit 1;
this has some problems though, but are more or less easily avoidable.

depesz

-- 
http://www.depesz.com/ - nowy, lepszy depesz

view thread (12+ messages)  latest in thread

Message-ID: <9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com>
Permalink:  ../9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com/
Also on:    postgresql.org/message-id/9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com

 · 

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: depesz@gmail.com, ogjunk-pgjedan@yahoo.com
  Subject: Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
  In-Reply-To: <9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com>
  References: <9e4684ce0606110810n50f8c44cjf02a273a65aac0c2@mail.gmail.com> <20060707043738.62724.qmail@web50312.mail.yahoo.com> <9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com>

* 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