문제

I'm working on small tool for gathering information about our postgres database and I have been looking at using the postgres Stats Collecter. It seems like there is a lot of info/stats in the table but I am having trouble understanding what exactly it all means.

If someone has used these views before would they be able to point me in the right direction for how to obtain stats such as the number of currently running queries or the slowest query? If these aren't possible from the postgres stats collector is there some other method for obtaining statistics that I could use?

One other thing I was confused about is if the stats collector limits the amount of data: for instance, will it only record the last x server processes?

도움이 되었습니까?

해결책

I suggest you look at what other monitoring tools already run - such as Munin or check_postgres for Nagios.

Specifically, for what you're asking here, look at the view pg_stat_activity.

And no, the stats collector tracks everything.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top