Re: How to know server status variable in postgresql?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to know server status variable in postgresql?
Date: 2014-01-07 23:37:15
Message-ID: 52CC8FAB.1090307@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/7/2014 4:33 AM, ambilalmca wrote:
> Hai, I am developing a java application for performance counter. For that i
> want to collect all server status counter names with current value. i just
> did it for MySQl by, *"SHOW GLOBAL STATUS"*. is their any query similar this
> to collect those details from the database. I am new to postgresql, so i
> dont know about it well. So if you know help me friends.

there's no such single source for 'all server status counters'. there's
a whole pile of different pg_catalog.pg_stat_*** tables with different
sorts of information, for each database.

the best script I've seen for pulling monitoring data out of postgres is
check_postgres from the Bucardo folks, this is designed to work with a
Nagios/Cacti type monitoring system.... its actually a perl script, you
run it repeatedly giving it specific things you want to look at (for
instance, size and name of largest tables, or total database size, or
number of active connections, etcetcetc).

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2014-01-08 01:31:18 Re: Sudden slow down and spike in system CPU causes max_connections to get exhausted
Previous Message Joe Van Dyk 2014-01-07 22:37:42 Re: Is there a way to return "true"/"false" string for boolean type?