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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/7/06, ogjunk-pgjedan@xxxxxxxxx <ogjunk-pgjedan@xxxxxxxxx> 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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux