开发者

Getting info from the Postgres stats collector

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 l开发者_开发百科ast 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜