Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?

From: "hubert depesz lubaczewski" <depesz(at)gmail(dot)com>
To: "ogjunk-pgjedan(at)yahoo(dot)com" <ogjunk-pgjedan(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?
Date: 2006-07-07 07:37:46
Message-ID: 9e4684ce0607070037g2a66d830sabc77aa2d3116229@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 7/7/06, ogjunk-pgjedan(at)yahoo(dot)com <ogjunk-pgjedan(at)yahoo(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Treat 2006-07-07 11:20:24 Re: FWD: [ADMIN] pg_dump error
Previous Message Christopher Browne 2006-07-07 04:38:37 Re: FWD: [ADMIN] pg_dump error