pgcenter (1) - Linux Manuals

pgcenter: is the PostgreSQL administration console with top-like monitoring.

NAME

pgcenter - is the PostgreSQL administration console with top-like monitoring.

SYNOPSIS

pgcenter [OPTION]... [DBNAME [USERNAME]]

DESCRIPTION

PostgreSQL provides various statistics which includes information about tables, indexes, functions and other database objects and their usage. Moreover, statistics has information about connections, current queries and database operations (INSERT/DELETE/UPDATE). But most of this statistics are provided as permanently incremented counters. The pgcenter provides convenient interface to this statistics and allow viewing statistics changes in time interval, eg. per second. The pgcenter provides fast access for database management task, such as editing configuration files, reloading services, viewing log files and canceling or terminating database backends (by pid or using state mask). However if need execute some specific operations, pgcenter can start psql session for this purposes.

The pgcenter uses screens and contexts. Screen is a special area for displaying statistics. Number of screen limited by eight. Context is the type of displayed statistics: table statistics, index statistics, functions statistics, replication statistics, etc.

All operations in pgcenter realized through hotkeys.

When pgcenter starts it using the connection parameters transmitted directly through the arguments, or use a connection file that describes the connections options. For each connection is allocated a separate screen. When the arguments and connections file used together, connect options from arguments always starts in the firts screen. If the arguments or connections file is not specified, pgcenter use default connection settings.

The pgcenter main window divided into 3 window: SUMMARY, CMDLINE, DBRESULT and optional LOGTAIL window which hidden by default and appears only by user command.

COMMAND-LINE OPTIONS

The command-line syntax for pgcenter consists of:
-h, --host=HOSTNAME
PostgreSQL server host or socket directory (default: "/tmp").
-p, --port=PORT
PostgreSQL server port (default: "5432").
-U, --username=USERNAME
PostgerSQL user name (default: "current logged user").
-d, --dbname=DBNAME
PostgreSQL administrative database name (default: "pgbouncer").
-f, --file=FILENAME
Use connections information from file. By default, pgcenter when starting, trying read ~/.pgcenterrc connections file. This behaviour can be overriden with this option.
-w, --no-password
Never prompt for password.
-W, --password
Force password prompt (should happen automatically).
-?, --help
Show this help, then exit.
-V, --version
Print version, then exit.

SUMMARY WINDOW

Summary window always displayed and provides various information about system load and current connected PostgreSQL.

Current Time and Load Average
Line 1-1 shows program name, current time, system load avg over the last 1, 5 and 15 minutes.

CPU Usage
Line 1-2 shows CPU usage percentages based on the interval since the last refresh.

us, user

Percentage of CPU utilization that occurred while executing at the user level (application).

sy, system

Percentage of CPU utilization that occurred while executing at the system level (kernel).

ni, nice

Percentage of CPU utilization that occurred while executing at the user level with nice priority.

id, idle

Percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

wa, iowait

Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

hi, hardirq

Percentage of time that the CPU or CPUS spent servicing hardware interrupts.

si, softirq

Percentage of time thatthe CPU or CPUS spent servicing software interrupts.

st, steal

Percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.

CPU Usage
Line 1-3 shows memory and line 1-4 shows swap usage based on the interval since the last refresh.

total

Total amount of RAM or swap in MiB (mebibyte = 1024 KiB = 1,048,576 bytes).

free

Total amount of free RAM or swap in MiB (mebibyte = 1024 KiB = 1,048,576 bytes).

used

Total amount of used RAM or swap in MiB (mebibyte = 1024 KiB = 1,048,576 bytes).

buff/cached

Total amount of cached and buffered RAM in MiB (mebibyte = 1024 KiB = 1,048,576 bytes).

dirty/writeback

Total ammount of dirty memory which is waiting to be written back to the disk. And total amount of memory actively being written back to the disk. Values are in MiB (mebibyte = 1024 KiB = 1,048,576 bytes).

Connection information
Line 2-1 shows connection information to the current PostgreSQL:

conn

Current screen number (from 1 to 8) and connection status.

conninfo

Current connection information with following format: host:port username [at] dbname.

postgresql version

Version of the PostgreSQL.

uptime

Uptime of PostgreSQL service.
Used query: SELECT now() - pg_postmaster_start_time();

Summary activity
Line 2-2 shows current PostgreSQL connections grouped by their states.

total

Total connections number.
Used query: SELECT count(*) FROM pg_stat_activity;

idle

Number of backends in idle state which is waiting for a new client command.
Used query: SELECT count(*) FROM pg_stat_activity 
            WHERE state = 'idle';

idle_in_xact

Number of backends in idle in transaction means the backend is in a transaction, but is not currently executing a query, and idle in transaction (aborted) which is similar to idle in transaction, except one of the statements in the transaction caused an error.
Used query: SELECT count(*) FROM pg_stat_activity 
            WHERE state IN ('idle in transaction', 'idle in transaction (aborted)');

active

Number of backends in active state when backends is executing a queries.
Used query: SELECT count(*) FROM pg_stat_activity 
            WHERE state = 'active';

waiting

Number of backends which is currently waiting on a lock.
Used query: SELECT count(*) FROM pg_stat_activity 
            WHERE waiting;

others

Number of backends with fastpath function call state which executes fast-path functions and disabled state which is reported only if track_activities is disabled in backend.
Used query: SELECT count(*) FROM pg_stat_activity 
            WHERE state IN ('fastpath function call','disabled');

Autovacuum activity
Line 2-3 shows current PostgreSQL autovacuum activity.

workers

Total number of autovacuum workers currently running.

max

Max number of allowed autovacuum workers.

manual

Total number of vacuum workers started by user.

wraparound

Total number of workers currently running and perform anti wraparound vacuum.

avw_maxtime

Execution time of the oldest autovacuum or user-started worker.

Statements activity
Line 2-4 shows statements activity. Some information provided by pg_stat_statements contrib module which not installed by default. For proper work, pg_stat_statements must be installed into database. For more information see URLS sections below.

stmt/s

Number of statements per second. This value calculated as difference between two values within 1 second interval.
Used query: SELECT sum(calls) FROM pg_stat_statements;

stmt_avgtime

Average queries duration in milisecond. Result defines here present the average time since the start of statistics collection. Therefore, to obtain a result that corresponds to the current time, pg_stat_statements statistics should be periodically reset (once a day, for example).
Used query: SELECT (sum(total_time) / sum(calls))::numeric(6,3) AS avg_query 
            FROM pg_stat_statements;

xact_maxtime

Execution time of the oldest transaction (not a query or session).
Used query: SELECT coalesce(date_trunc('seconds', max(now() - xact_start)), '00:00:00')
            FROM pg_stat_activity;

CMDLINE WINDOW

Cmdline window used for displaying diagnostic messages or when need additional input from user.

DBRESULT WINDOW

Dbresult window used for displaying statistics from PostgreSQL. Here pgcenter uses statistics contexts, which determines what type of statistics will be shown.

pg_stat_database context
Statistics from pg_stat_database system view which show database-wide statistics. Note, when new database created or existing database dropped, pgcenter resets it's own counters (not postgresql statistics counters) to zero.
Used query: SELECT 
                datname, 
                xact_commit AS commit, xact_rollback AS rollback, 
                blks_read AS reads, blks_hit AS hits,
                tup_returned AS returned, tup_fetched AS fetched, 
                tup_inserted AS inserts, tup_updated AS updates, tup_deleted AS deletes, 
                conflicts, deadlocks, 
                temp_files AS tmp_files, temp_bytes AS tmp_bytes, 
                blk_read_time AS read_t, blk_write_time AS write_t 
            FROM pg_stat_database ORDER BY datname;

datname

Name of this database.

commit

Number of transactions per second in this database that have been committed.

rollback

Number of transactions per second in this database that have been rolled back.

reads

Number of disk blocks read per second in this database.

hits

Number of times per second when disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache).

returned

Number of rows returned by queries in this database (per second).

fetched

Number of rows fetched by queries in this database (per second).

inserts

Number of rows inserted by queries in this database (per second).

updates

Number of rows updated by queries in this database (per second).

deletes

Number of rows deleted by queries in this database (per second).

conflicts

Number of queries per second canceled due to conflicts with recovery in this database. Conflicts occur only on standby servers.

deadlocks

Number of deadlocks detected in this database (per second).

tmp_files

Number of temporary files created by queries in this database (pre second). All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the log_temp_files setting.

tmp_bytes

Total amount of data written to temporary files by queries in this database (per second). All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.

read_t

Time spent reading data file blocks by backends in this database, in milliseconds.

write_t

Time spent writing data file blocks by backends in this database, in milliseconds.

pg_stat_replication context
Statistics from pg_stat_replication system view which will contain one row per WAL sender process, showing statistics about replication to that sender's connected standby server. Only directly connected standbys are listed; no information is available about downstream standby servers.
Used query: SELECT
                client_addr AS client, usename AS user, application_name AS name,
                state, sync_state AS mode,
                (pg_xlog_location_diff(pg_current_xlog_location(),sent_location) / 1024)::int as pending,
                (pg_xlog_location_diff(sent_location,write_location) / 1024)::int as write,
                (pg_xlog_location_diff(write_location,flush_location) / 1024)::int as flush,
                (pg_xlog_location_diff(flush_location,replay_location) / 1024)::int as replay,
                (pg_xlog_location_diff(pg_current_xlog_location(),replay_location))::int / 1024 as total_lag
            FROM pg_stat_replication"

client

IP address of the client connected to this WAL sender. If this field is null, it indicates that the client is connected via a Unix socket on the server machine.

user

Name of the user logged into this WAL sender process.

name

Name of the application that is connected to this WAL sender.

state

Current WAL sender state.

mode

Synchronous state of this standby server.

pending

Difference between XLOG current position and XLOG sent position, shows amount of XLOG in kilobytes which should be sent over network.

write

Difference between XLOG sent position and XLOG write position, shows amount of XLOG in kilobytes which sent over network, but not written yet on remote host.

flush

Difference between XLOG write position and XLOG flush position, shows amount of XLOG in kilobytes which written, but not flushed yet on remote host.

replay

Difference between XLOG flush position and XLOG replay position, shows amount of XLOG in kilobytes which flushed, but not replayed yet on remote host.

total_lag

Difference between XLOG current position on the master server and XLOG replay position onremote host, shows the total amount of XLOG in kilobytes, the standby is behind.

pg_stat_tables context
Statistics from pg_stat_user_tables or pg_stat_all_tables views which will contain one row for each table in the current database (including TOAST tables), showing statistics about accesses to that specific table. pg_stat_user_tables used by default, and pgcenter can be switched to pg_stat_all_tables using , hotkey.
Used query: SELECT
                schemaname || '.' || relname AS relation,
                seq_scan, seq_tup_read AS seq_read,
                idx_scan, idx_tup_fetch AS idx_fetch,
                n_tup_ins AS inserts, n_tup_upd AS updates,
                n_tup_del AS deletes, n_tup_hot_upd AS hot_updates,
                n_live_tup AS live, n_dead_tup AS dead
            FROM pg_stat_user_tables ORDER BY 1;

relation

Name of this table including schemaname.

seq_scan

Number of sequential scans initiated on this table (per second).

seq_read

Number of live rows fetched by sequential scans (per second).

idx_scan

Number of index scans initiated on this table (per second).

idx_fetch

Number of live rows fetched by index scans (per second).

inserts

Number of rows inserted (per second).

updates

Number of rows updated (per second).

deletes

Number of rows deleted (per second).

hot_updates

Number of rows HOT updated means with no separate index update required (per second).

live

Estimated number of live rows (per second).

dead

Estimated number of dead rows (per second).

pg_statio_tables context
Show statistics from pg_statio_user_tables or pg_statio_all_tables views which showing statistics about I/O on that specific table in the current database. pg_statio_user_tables used by default, and pgcenter can be switched to pg_statio_all_tables using , hotkey.
Used query: SELECT
                schemaname ||'.'|| relname AS relation,
                heap_blks_read * (SELECT current_setting('block_size')::int / 1024) AS heap_read,
                heap_blks_hit * (SELECT current_setting('block_size')::int / 1024) AS heap_hit,
                idx_blks_read * (SELECT current_setting('block_size')::int / 1024) AS idx_read,
                idx_blks_hit * (SELECT current_setting('block_size')::int / 1024) AS idx_hit,
                toast_blks_read * (SELECT current_setting('block_size')::int / 1024) AS toast_read,
                toast_blks_hit * (SELECT current_setting('block_size')::int / 1024) AS toast_hit,
                tidx_blks_read * (SELECT current_setting('block_size')::int / 1024) AS tidx_read,
                tidx_blks_hit * (SELECT current_setting('block_size')::int / 1024) AS tidx_hit
            FROM pg_statio_user_tables ORDER BY 1;

relation

Name of this table including schemaname.

heap_read

Number of data read from disk related to this table in kilobytes per second.

heap_hit

Number of buffer hits in this table in kilobytes per second.

idx_read

Number of data read from disk in kilobytes per second related to all indexes on this table.

idx_hit

Number of buffer hits in all indexes on this table in kilobytes per second.

toast_read

Number of data read from disk in kilobytes per second from this table's TOAST table (if any).

toast_hit

Number of buffer hits in this table's TOAST table (if any) in kilobytes per second.

tidx_read

Number of data read from disk in kilobytes per second from this table's TOAST table indexes (if any).

tidx_hit

Number of buffer hits in this table's TOAST table indexes (if any) in kilobytes per second.

pg_stat_indexes context
Show statistics from pg_stat_user_indexes and pg_statio_user_indexes (or pg_stat_all_indexes and pg_statio_all_indexes). The pg_stat_user_indexes view will contain one row for each index in the current database, showing statistics about accesses to that specific index. pg_statio_user_indexes view will contain one row for each index in the current database, showing statistics about I/O on that specific index.

Note: Indexes can be used via either simple index scans or "bitmap" index scans. In a bitmap scan the output of several indexes can be combined via AND or OR rules, so it is difficult to associate individual heap row fetches with specific indexes when a bitmap scan is used. Therefore, a bitmap scan increments the pg_stat_all_indexes.idx_tup_read count(s) for the index(es) it uses, and it increments the pg_stat_all_tables.idx_tup_fetch count for the table, but it does not affect pg_stat_all_indexes.idx_tup_fetch. The idx_tup_read and idx_tup_fetch counts can be different even without any use of bitmap scans, because idx_tup_read counts index entries retrieved from the index while idx_tup_fetch counts live rows fetched from the table. The latter will be less if any dead or not-yet-committed rows are fetched using the index, or if any heap fetches are avoided by means of an index-only scan.

Used query: SELECT
                s.schemaname ||'.'|| s.relname as relation, s.indexrelname AS index,
                s.idx_scan, s.idx_tup_read, s.idx_tup_fetch,
                i.idx_blks_read * (SELECT current_setting('block_size')::int / 1024) AS idx_read,
                i.idx_blks_hit * (SELECT current_setting('block_size')::int / 1024) AS idx_hit
            FROM
                pg_stat_user_indexes s,
                pg_statio_user_indexes i
            WHERE s.indexrelid = i.indexrelid ORDER BY 1;

relation

Name of the table for this index including schemaname.

index

Name of this index.

idx_scan

Number of index scans per second initiated on this index.

idx_tup_read

Number of index entries returned per second by scans on this index.

idx_tup_fetch

Number of live table rows fetched per second by simple index scans using this index.

idx_read

Number of disk blocks read per second from this index.

idx_hit

Number of buffer hits per second in this index.

pg_tables_size context
Show statistics about tables sizes. For taking information about size of relations use pg_stat_user_tables (or pg_stat_all_tables) view, pg_class system catalog and pg_relation_size(), pg_total_relation_size() functions.
Used query: SELECT
        s.schemaname ||'.'|| s.relname AS relation,
        pg_total_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024 AS total_size,
        pg_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024 AS rel_size,
        (pg_total_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024) -
            (pg_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024) AS idx_size,
        pg_total_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024 AS total_change,
        pg_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024 AS rel_change,
        (pg_total_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024) -
            (pg_relation_size((s.schemaname ||'.'|| s.relname)::regclass) / 1024) AS idx_change
        FROM pg_stat_user_tables s, pg_class c WHERE s.relid = c.oid ORDER BY 1;

relation

Name of this table including schema name.

total_size

Total size of relation including indexes, in kilobytes.

rel_size

Size of relation without indexes, in kilobytes.

idx_size

Size of all indexes of relation, in kilobytes.

total_change

Relation and indexes size changes in kilobytes per second.

rel_change

Only relation size changes in kilobytes per second.

idx_change

Only indexes size changes in kilobytes per second.

pg_stat_activity context
Show process activity from pg_stat_activity which have one row per server process, showing information related to the current activity of that process. Show process which runs too long. Default threshold is 10 seconds, and can be changed with A hotkey. Idle process not displaying. Note: The waiting and state columns are independent. If a backend is in the active state, it may or may not be waiting. If the state is active and waiting is true, it means that a query is being executed, but is being blocked by a lock somewhere in the system.
Used query: SELECT
                pid, client_addr AS cl_addr, client_port AS cl_port,
                datname, usename, state, waiting,
                date_trunc('seconds', clock_timestamp() - xact_start) AS xact_age,
                date_trunc('seconds', clock_timestamp() - query_start) AS query_age,
                date_trunc('seconds', clock_timestamp() - state_change) AS change_age,
                query
            FROM pg_stat_activity
            WHERE ((clock_timestamp() - xact_start) > '00:00:10'::interval
                   OR (clock_timestamp() - query_start) > '00:00:10'::interval) 
            AND state <> 'idle' AND pid <> pg_backend_pid()
            ORDER BY COALESCE(xact_start, query_start);

pid

Process ID of this backend.

cl_addr

IP address of the client connected to this backend. If this field is null, it indicates either that the client is connected via a Unix socket on the server machine or that this is an internal process such as autovacuum.

cl_port

TCP port number that the client is using for communication with this backend, or -1 if a Unix socket is used.

datname

Name of the database this backend is connected to.

usename

Name of the user logged into this backend.

state

Current overall state of this backend. Possible values are:

active

The backend is executing a query.

idle

The backend is waiting for a new client command.

idle in transaction

The backend is in a transaction, but is not currently executing a query.

idle in transaction (aborted)

This state is similar to idle in transaction, except one of the statements in the transaction caused an error.

fastpath function call

The backend is executing a fast-path function.

disabled

This state is reported if track_activities is disabled in this backend.

waiting

True if this backend is currently waiting on a lock.

xact_age

Age of transaction started within current process, or null if no transaction is active. If the current query is the first of its transaction, this column is equal to the query_age column.

query_age

Age of currently active query, or if state is not active, when the last query was started.

change_age

Age since when the state was last changed.

query

Text of this backend's most recent query. If state is active this field shows the currently executing query. In all other states, it shows the last query that was executed.

pg_stat_functions context
Show statistics from pg_stat_user_function view which contain one row for each tracked function, showing statistics about executions of that function. The track_functions parameter in postgresql.conf controls exactly which functions are tracked.
Used query: SELECT
                funcid, schemaname ||'.'||funcname AS function,
                calls AS total_calls, calls AS calls,
                date_trunc('seconds', total_time / 1000 * '1 second'::interval) AS total_t,
                date_trunc('seconds', self_time / 1000 * '1 second'::interval) AS self_t,
                round((total_time / calls)::numeric, 4) AS avg_t,
                round((self_time / calls)::numeric, 4) AS avg_self_t
            FROM pg_stat_user_functions ORDER BY x DESC;

funcid

Unique OID of a function.

function

Name of this function, including schema name.

total_calls

Number of times this function has been called.

calls

Number of times this function has been called per second.

total_t

Total time spent in this function and all other functions called by it.

self_t

Total time spent in this function itself, not including other functions called by it.

avg_t

Average time spent in this function and all other functions called by it, in milliseconds.

avg_self_t

Average time spent in this function itself, not including other functions called by it, in milliseconds.

pg_stat_statements_timing context
Show timing statistics from pg_stat_statements module which tracking execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql.conf. This means that a server restart is needed to add or remove the module. When module loaded, pg_stat_statement extension must be installed in target database. For more information see http://www.postgresql.org/docs/9.4/static/pgstatstatements.html. Additionally used pg_authid and pg_database views. Different versions of the PostgreSQL may have different number of fields.
Used query: SELECT
        a.rolname AS user, d.datname AS database,
        date_trunc('seconds', round(sum(p.total_time)) / 1000 * '1 second'::interval) AS t_all_t,
        date_trunc('seconds', round(sum(p.blk_read_time)) / 1000 * '1 second'::interval) AS t_read_t,
        date_trunc('seconds', round(sum(p.blk_write_time)) / 1000 * '1 second'::interval) AS t_write_t,
        date_trunc('seconds', round((sum(p.total_time) - (sum(p.blk_read_time) + sum(p.blk_write_time)))) / 1000 * '1 second'::interval) AS tot_cpu_t,
        round(sum(p.total_time)) AS all_t,
        round(sum(p.blk_read_time)) AS read_t,
        round(sum(p.blk_write_time)) AS write_t,
        round((sum(p.total_time) - (sum(p.blk_read_time) + sum(p.blk_write_time)))) AS cpu_t,
        sum(p.calls) AS calls,
        left(md5(d.datname || a.rolname || p.query ), 10) AS queryid,
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(p.query,
            E'\\?(::[a-zA-Z_]+)?( *, *\\?(::[a-zA-Z_]+)?)+', '?', 'g'),
            E'\\$[0-9]+(::[a-zA-Z_]+)?( *, *\\$[0-9]+(::[a-zA-Z_]+)?)*', '$N', 'g'),
            E'--.*$', '', 'ng'),
            E'/\\*.*?\\*\/', '', 'g'),
            E'\\s+', ' ', 'g') AS query
    FROM pg_stat_statements p
    JOIN pg_authid a ON a.oid=p.userid
    JOIN pg_database d ON d.oid=p.dbid
    WHERE d.datname != 'postgres' AND calls > 50
    GROUP BY a.rolname, d.datname, query;

user

User who executed the statement.

database

Database in which the statement was executed.

t_all_t

Total time spent in the statement since last stats reset.

t_read_t

Total time the statement spent reading blocks (if track_io_timing is enabled, otherwise zero) since last stats reset.

t_write_t

Total time the statement spent writing blocks (if track_io_timing is enabled, otherwise zero) since last stats reset.

t_cpu_t

Total time the statement spent in CPU cycling (if track_io_timing is enabled, otherwise equals total_t) since last stats reset.

all_t

Current time spent in the statement in ms.

read_t

Current time the statement spent reading blocks (if track_io_timing is enabled, otherwise zero) in ms.

write_t

Total time the statement spent writing blocks (if track_io_timing is enabled, otherwise zero) in ms.

cpu_t

Total time the statement spent in CPU cycling, (if track_io_timing is enabled, otherwise equals total_t) in ms.

calls

Current number of query calls.

queryid

Query ID generated with MD5 hash function and truncated to 10 symbols. Hash based on username, dbname and query text.

query

Text of a representative statement.

pg_stat_statements_general context
Show general statistics about rows and calls from pg_stat_statements module which tracking execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql.conf. This means that a server restart is needed to add or remove the module. When module loaded, pg_stat_statement extension must be installed in target database. For more information see http://www.postgresql.org/docs/9.4/static/pgstatstatements.html. Additionally used pg_authid and pg_database views.
Used query: SELECT
        a.rolname AS user, d.datname AS database,
        sum(p.calls) AS t_calls, sum(p.rows) as t_rows,
        sum(p.calls) AS calls, sum(p.rows) as rows,
        left(md5(d.datname || a.rolname || p.query ), 10) AS queryid,
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(p.query,
            E'\\?(::[a-zA-Z_]+)?( *, *\\?(::[a-zA-Z_]+)?)+', '?', 'g'),
            E'\\$[0-9]+(::[a-zA-Z_]+)?( *, *\\$[0-9]+(::[a-zA-Z_]+)?)*', '$N', 'g'),
            E'--.*$', '', 'ng'),
            E'/\\*.*?\\*\/', '', 'g'),
            E'\\s+', ' ', 'g') AS query
    FROM pg_stat_statements p
    JOIN pg_authid a ON a.oid=p.userid
    JOIN pg_database d ON d.oid=p.dbid
    WHERE d.datname != 'postgres' AND calls > 50
    GROUP BY a.rolname, d.datname, query;

user

User who executed the statement.

database

Database in which the statement was executed.

t_calls

Total number of times the statement was executed.

t_rows

Total number of rows retrieved or affected by the statement.

calls

Number of times the statement was executed per second.

rows

Number of rows retrieved or affected by the statement per second.

queryid

Query ID generated with MD5 hash function and truncated to 10 symbols. Hash based on username, dbname and query text.

query

Text of a representative statement

pg_stat_statements_io context
Show statistics about buffer input/output from pg_stat_statements module which tracking execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql.conf. This means that a server restart is needed to add or remove the module. When module loaded, pg_stat_statement extension must be installed in target database. For more information see http://www.postgresql.org/docs/9.4/static/pgstatstatements.html. Additionally used pg_authid and pg_database views.
Used query: SELECT
        a.rolname AS user, d.datname AS database,
        (sum(p.shared_blks_hit) + sum(p.local_blks_hit))
            * (SELECT current_setting('block_size')::int / 1024) as t_hits,
        (sum(p.shared_blks_read) + sum(p.local_blks_read))
            * (SELECT current_setting('block_size')::int / 1024) as t_reads,
        (sum(p.shared_blks_dirtied) + sum(p.local_blks_dirtied))
            * (SELECT current_setting('block_size')::int / 1024) as t_dirtied,
        (sum(p.shared_blks_written) + sum(p.local_blks_written))
            * (SELECT current_setting('block_size')::int / 1024) as t_written,
        (sum(p.shared_blks_hit) + sum(p.local_blks_hit))
            * (SELECT current_setting('block_size')::int / 1024) as hits,
        (sum(p.shared_blks_read) + sum(p.local_blks_read))
            * (SELECT current_setting('block_size')::int / 1024) as reads,
        (sum(p.shared_blks_dirtied) + sum(p.local_blks_dirtied))
            * (SELECT current_setting('block_size')::int / 1024) as dirtied,
        (sum(p.shared_blks_written) + sum(p.local_blks_written))
            * (SELECT current_setting('block_size')::int / 1024) as written,
        sum(p.calls) AS calls,
        left(md5(d.datname || a.rolname || p.query ), 10) AS queryid,
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(p.query,
            E'\\?(::[a-zA-Z_]+)?( *, *\\?(::[a-zA-Z_]+)?)+', '?', 'g'),
            E'\\$[0-9]+(::[a-zA-Z_]+)?( *, *\\$[0-9]+(::[a-zA-Z_]+)?)*', '$N', 'g'),
            E'--.*$', '', 'ng'),
            E'/\\*.*?\\*\/', '', 'g'),
            E'\\s+', ' ', 'g') AS query
    FROM pg_stat_statements p
    JOIN pg_authid a ON a.oid=p.userid
    JOIN pg_database d ON d.oid=p.dbid
    WHERE d.datname != 'postgres' AND calls > 50
    GROUP BY a.rolname, d.datname, query;

user

User who executed the statement.

database

Database in which the statement was executed.

t_hits

Total amount of shared and local data hits from cache by the statement since stats reset, in Kbytes.

t_reads

Total amount of shared and local data read by the statement since stats reset, in Kbytes.

t_dirtied

Total amount of shared and local data dirtied by the statement since stats reset, in Kbytes.

t_written

Total amount of shared and local data written by the statement since stats reset, in Kbytes.

hits

Amount of shared and local data hits from cache by the statement per interval (default 1 second), in Kbytes.

reads

Amount of shared and local data read by the statement per interval (default 1 second), in Kbytes.

dirtied

Amount of shared and local data dirtied by the statement per interval (default 1 second), in Kbytes.

written

Amount of shared and local data written by the statement per interval (default 1 second), in Kbytes.

calls

Number of rows retrieved or affected by the statement per interval.

queryid

Query ID generated with MD5 hash function and truncated to 10 symbols. Hash based on username, dbname and query text.

query

Text of a representative statement

pg_stat_statements_temp context
Show statistics about buffers input/output related with temporary buffers. Stats read from pg_stat_statements module which tracking execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql.conf. This means that a server restart is needed to add or remove the module. When module loaded, pg_stat_statement extension must be installed in target database. For more information see http://www.postgresql.org/docs/9.4/static/pgstatstatements.html. Additionally used pg_authid and pg_database views.
Used query: SELECT
        a.rolname AS user, d.datname AS database,
        sum(p.temp_blks_read)
            * (SELECT current_setting('block_size')::int / 1024) as t_tmp_read,
        sum(p.temp_blks_written)
            * (SELECT current_setting('block_size')::int / 1024) as t_tmp_write,
        sum(p.temp_blks_read)
            * (SELECT current_setting('block_size')::int / 1024) as tmp_read,
        sum(p.temp_blks_written)
            * (SELECT current_setting('block_size')::int / 1024) as tmp_write,
        sum(p.calls) AS calls,
        left(md5(d.datname || a.rolname || p.query ), 10) AS queryid,
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(p.query,
            E'\\?(::[a-zA-Z_]+)?( *, *\\?(::[a-zA-Z_]+)?)+', '?', 'g'),
            E'\\$[0-9]+(::[a-zA-Z_]+)?( *, *\\$[0-9]+(::[a-zA-Z_]+)?)*', '$N', 'g'),
            E'--.*$', '', 'ng'),
            E'/\\*.*?\\*\/', '', 'g'),
            E'\\s+', ' ', 'g') AS query
    FROM pg_stat_statements p
    JOIN pg_authid a ON a.oid=p.userid
    JOIN pg_database d ON d.oid=p.dbid
    WHERE d.datname != 'postgres' AND calls > 50
    GROUP BY a.rolname, d.datname, query;

user

User who executed the statement.

database

Database in which the statement was executed.

t_tmp_read

Total amount of temp data read by the statement since last stats reset, in Kbytes.

t_tmp_write

Total amount of temp data written by the statement sice last stats reset, in Kbytes.

tmp_read

Amount of temp data read by the statement per interval, in Kbytes.

tmp_write

Amount of temp data written by the statement per interval, in Kbytes.

calls

Number of times the statement was executed per second.

queryid

Query ID generated with MD5 hash function and truncated to 10 symbols. Hash based on username, dbname and query text.

query

Text of a representative statement

pg_stat_statements_local context
Show statistics about local input/output (backends that use local memory and not shared buffers) from pg_stat_statements module which tracking execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql.conf. This means that a server restart is needed to add or remove the module. When module loaded, pg_stat_statement extension must be installed in target database. For more information see http://www.postgresql.org/docs/9.4/static/pgstatstatements.html. Additionally used pg_authid and pg_database views.
Used query: SELECT
        a.rolname AS user, d.datname AS database,
        (sum(p.local_blks_hit)) * (SELECT current_setting('block_size')::int / 1024) as t_lo_hits,
        (sum(p.local_blks_read)) * (SELECT current_setting('block_size')::int / 1024) as t_lo_reads,
        (sum(p.local_blks_dirtied)) * (SELECT current_setting('block_size')::int / 1024) as t_lo_dirtied,
        (sum(p.local_blks_written)) * (SELECT current_setting('block_size')::int / 1024) as t_lo_written,
        (sum(p.local_blks_hit)) * (SELECT current_setting('block_size')::int / 1024) as lo_hits,
        (sum(p.local_blks_read)) * (SELECT current_setting('block_size')::int / 1024) as lo_reads,
        (sum(p.local_blks_dirtied)) * (SELECT current_setting('block_size')::int / 1024) as lo_dirtied,
        (sum(p.local_blks_written)) * (SELECT current_setting('block_size')::int / 1024) as lo_written,
        sum(p.calls) AS calls,
        left(md5(d.datname || a.rolname || p.query ), 10) AS queryid,
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(
        regexp_replace(p.query,
            E'\\?(::[a-zA-Z_]+)?( *, *\\?(::[a-zA-Z_]+)?)+', '?', 'g'),
            E'\\$[0-9]+(::[a-zA-Z_]+)?( *, *\\$[0-9]+(::[a-zA-Z_]+)?)*', '$N', 'g'),
            E'--.*$', '', 'ng'),
            E'/\\*.*?\\*\/', '', 'g'),
            E'\\s+', ' ', 'g') AS query
    FROM pg_stat_statements p
    JOIN pg_authid a ON a.oid=p.userid
    JOIN pg_database d ON d.oid=p.dbid
    WHERE d.datname != 'postgres' AND calls > 50
    GROUP BY a.rolname, d.datname, query;

user

User who executed the statement.

database

Database in which the statement was executed.

t_lo_hits

Total amount of data hits from backends local memory by the statement since stats reset, in Kbytes.

t_lo_reads

Total amount of data read from backends local memory by the statement since stats reset, in Kbytes.

t_lo_dirtied

Total amount of data dirtied in backends local memory by the statement since stats reset, in Kbytes.

t_lo_written

Total amount of data written to backends local memory by the statement since stats reset, in Kbytes.

lo_hits

Amount of data hits from backends local memory by the statement per interval (default 1 second), in Kbytes.

lo_reads

Amount of data read from backends local memory by the statement per interval (default 1 second), in Kbytes.

lo_dirtied

Amount of data dirtied in backends local memory by the statement per interval (default 1 second), in Kbytes.

lo_written

Amount of data written to backends local memory by the statement per interval (default 1 second), in Kbytes.

calls

Number of rows retrieved or affected by the statement per interval.

queryid

Query ID generated with MD5 hash function and truncated to 10 symbols. Hash based on username, dbname and query text.

query

Text of a representative statement

pg_stat_progress_vacuum context
Whenever VACUUM is running, the pg_stat_progress_vacuum view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming. The tables below describe the information that will be reported and provide information about how to interpret it. Progress reporting is not currently supported for VACUUM FULL and backends running VACUUM FULL will not be listed in this view. This statistics are available since PostgreSQL 9.6, for more information see https://www.postgresql.org/docs/9.6/static/progress-reporting.html. Additionally used pg_stat_activity view.
Used query:
    SELECT
        a.pid,
        date_trunc('seconds', clock_timestamp() - xact_start) AS xact_age,
        v.datname, v.relid::regclass AS relation,
        a.state, v.phase,
        v.heap_blks_total * (SELECT current_setting('block_size')::int / 1024) AS total,
        v.heap_blks_scanned * (SELECT current_setting('block_size')::int / 1024) AS scanned,
        v.heap_blks_vacuumed * (SELECT current_setting('block_size')::int / 1024) AS vacuumed,
        a.wait_event_type AS wait_etype, a.wait_event,
        a.query
    FROM pg_stat_progress_vacuum v
    JOIN pg_stat_activity a ON v.pid = a.pid
    ORDER BY COALESCE(a.xact_start, a.query_start)

pid

Process ID of vacuum.

xact_age

Age of vacuum task.

datname

Database name where vacuum worker is connected.

state

Postgres backend state (see pg_stat_activity backends states).

phase

Current processing phase of vacuum. See VACUUM phases - https://www.postgresql.org/docs/9.6/static/progress-reporting.html#VACUUM-PHASES.

total

Total size of the table in Kbytes. This number is reported as of the beginning of the scan; size increased during vacuum will not be (and need not be) shown and this space will not be visited by this VACUUM.

scanned

Size of table in Kbytes that is scanned. Because the visibility map is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become equal to total when the vacuum is complete. This counter only advances when the phase is scanning heap.

vacuumed

Size of table in Kbytes that is vacuumed. Unless the table has no indexes, this counter only advances when the phase is vacuuming heap. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments.

wait_etype

The type of event for which the backend is waiting, if any; otherwise NULL.

wait_event

Wait event name if backend is currently waiting, otherwise NULL.

query

Text of a representative statement.

SUBSCREENS

Subscreens it's a additional screens which presents auxilary data which not directly related with the PostgreSQL but may be useful in troubleshoot.

Logtail subscreen
Opens logfile in subscreen and tail this log. Used only if pgcenter and PostgreSQL running on the same host. All multiline log entries truncates to end of line. Requires database superuser privileges.

iostat subscreen
Report input/output statistics for devices and partitions. The iostat subscreen is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates. The first report generated by the iostat subscreen provides statistics concerning the time since the system was booted. Each subsequent report covers the time since the previous report. Iostat subscreen similar to iostat utility from sysstat package and /proc/diskstats interface. For the proper iostat work /proc filesystem must be mounted for iostat to work. Kernels older than 2.6.x are not supported.

Device

Block device registered in a system.

rrqm/s

The number of read requests merged per second that were queued to the device.

wrqm/s

The number of write requests merged per second that were queued to the device.

r/s

The number (after merges) of read requests completed per second for the device.

w/s

The number (after merges) of write requests completed per second for the device.

rMB/s

The number of megabytes read from the device per second.

wMB/s

The number of megabytes written to the device per second.

avgrq-sz

The average size (in sectors) of the requests that were issued to the device.

avgqu-sz

The average queue length of the requests that were issued to the device.

await

The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

r_await

The average time (in milliseconds) for read requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

w_await

The average time (in milliseconds) for write requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

%util

Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% for devices serving requests serially. But for devices serving requests in parallel, such as RAID arrays and modern SSDs, this number does not reflect their performance limits.

nicstat subscreen
Print network traffic statistics for all network cards (NICs), including packets, kilobytes per second, average packet sizes and more. Nicstat subscreen similar to nicstat utility and use /proc/net/dev interface.

Interface

Network interface registered in a system.

rMbps

Megabits per interval read (received).

wMbps

Megabits per interval written (transmitted).

rPk/s

Packets per interval read (received).

wPk/s

Packets per interval written (transmitted).

rAvs

Average size of packets read (received).

wAvs

Average size of packets written (transmitted).

IErr

Packets received that could not be processed because they contained errors.

OErr

Packets that were not successfully transmitted because of errors.

Coll

Ethernet collisions during transmit.

Sat

Saturation. This the number of errors/second seen for the interface - an indicator the interface may be approaching saturation. This statistic is combined from a number of kernel statistics.

%rUtil %wUtil

Percentage utilization for bytes read and written, respectively.

%Util

Percentage utilization of the interface. For full-duplex interfaces, this is the greater of rMB/s or wMB/s as a percentage of the interface speed. For half-duplex interfaces, rMB/s and wMB/s are summed.

INTERACTIVE COMMANDS

The global interactive commands are always available main program mode
   1..8  :Switch screen toggle
Switch between already opened screens. Number of screens limited by eight.
   d  :pg_stat_database toggle
Show statistics from pg_stat_database view. This statistics includes per database info about commits/rollbacks, returned and fetched tuples, write operations such as inserts/deletes/updates, abnormal situations like conflicts and deadlocks, info about temporary files usage and read/write timings.
   r  :pg_stat_replication toggle
Show statistics from pg_stat_replication view. Statistics about streaming replication connections, includes information about connected standbys and amount of data which is sent, written, flushed or replayed on standby servers. Also available info about replication lag.
   t  :pg_stat_tables toggle
Show statistics from pg_stat_user_tables (or pg_stat_all_tables) view about accesses to that specific tables. Includes sequential/index scans, number of inserted/updated/deleted tuples, number of live/dead tuples. Useful for determine current tables workload. By default, displayed only user tables, displaying system tables can be enabled by pressing V.
   T  :pg_statio_tables toggle
Show statistics from pg_statio_user_tables (or pg_statio_all_tables) view about I/O on tables in the current database. Includes info about reads from disk and shared buffers related to tables, their indexes or TOAST. Useful for determine current tables workload. By default, displayed only user tables, displaying system tables can be enabled by pressing V.
   i  :pg_stat_indexes toggle
Show statistics from pg_stat_user_indexes and pg_statio_user_indexes (or pg_stat_all_indexes and pg_statio_all_indexes) views which showing statistics about accesses to that specific indexes and their I/O. Includes info about number of index scans, number of readen and fetched tuples, data read from disk or shared buffers. By default, displayed only user indexes, displaying system indexes can be enabled by pressing V. Useful for determine index usage.
   s  :pg_tables_size toggle
Show statistics about tables and their indexes sizes. For taking information about size of relations use pg_stat_user_tables (or pg_stat_all_tables) view, pg_class system catalog and pg_relation_size(), pg_total_relation_size() functions.
   a  :pg_stat_activity toggle
Show statistics about long queries from pg_stat_activity view. Show information about client (address, port, name, database), text of query and his state and age. Default age threshold is 10 seconds, and can be changed with A hotkey.
   f  :pg_stat_functions toggle
Show statistics from pg_stat_user_functions view about tracked functions and their executions, such as number of calls and execution time. The track_functions parameter in postgresql.conf controls exactly which functions are tracked.
   v  :pg_stat_progress_vacuum toggle
Show statistics from pg_stat_progress_vacuum view about vacuum execution progress. Available since PostgreSQL 9.6.
   x  :Switch to next pg_stat_statements screen toggle
Switches between pg_stat_statements screens: timings, general, input/output, temporary input/output, local input/output.
   X  :Show pg_stat_statements menu toggle
Open pg_stat_statements menu and allow to choose pg_stat_statements screen without switching.
   E  :Edit configuration files menu toggle
Open configuration files menu and edit specific config. Supported editing of postgresql.conf, pg_hba.conf, pg_ident.conf and recovery.conf. Used only if pgcenter and PostgreSQL running on the same host. Use $EDITOR environment variable or vi by default. Requires database superuser privileges.
   C  :Show current configuration toggle
Show current PostgreSQL configuration from pg_settings view. For viewing all parameters requires database superuser privileges.
   R  :Reload toggle
Reload PostgreSQL service for apply configuration changes. The pgcenter used pg_reload_conf() function for reloading. Requires database superuser privileges.
   p  :Start psql session toggle
Start psql session with current connection settings.
   B  :Open iostat subscreen toggle
Open subscreen with iostat which reporting input/output statistics for devices and partitions. Show statistics from current host.
   I  :Open nicstat subscreen toggle
Open subscreen with nicstat which reporting network statistics for all network cards (NICs), including packets, kilobytes per second, average packet sizes and more.. Show statistics from current host.
   L  :Open logtail subscreen toggle
Open subscreen and tail postgresql log. Used only if pgcenter and PostgreSQL running on the same host. Requires database superuser privileges.
   l  :Open log file toggle
Open logfile with pager. Use $PAGER environment variable or less by default. Used only if pgcenter and PostgreSQL running on the same host. Requires database superuser privileges.
   N  :Open new connection toggle
Open new screen with new connection to PostgreSQL. Specify host, port, user, dbname options and open new connection.
   Ctrl+D  :Close current connection toggle
Close current screen and connection.
   W  :Write connection options toggle
Write connection settings into config file. By default is ~/.pgcenterrc is used. If --file=FILENAME argument was used at pgcenter start, connection settings will be written at specified file.
   Left, Right  :Change sort toggle
Change column which is used for sort.
   /  :Change sort order toggle
Change sort order, descent or ascent. Descent order used by default.
   F  :Set filtration toggle
Set filter pattern for a column, or reset filtration with empty value. Note, filter patterns are remebered between tab and context switches. Filtered column marked with * symbol. No filtration by default.
   -  :Cancel backend toggle
Cancel query execution using backend pid with pg_cancel_backend() function. This function allowed only when pg_stat_activity screen enabled by a hotkey. Requires database superuser privileges.
   _  :Terminate backend toggle
Terminate process using backend pid with pg_terminate_backend() function. This function allowed only when pg_stat_activity screen enabled by a hotkey. Requires database superuser privileges.
   Del  :Cancel group of backends toggle
Cancel queries execution in group of backends with pg_cancel_backend() function. Group of backends determined using mask which specified by n toggle. Note, queries are canceled without confirmation. This function allowed only when pg_stat_activity screen enabled by a hotkey. Unprivileged users can cancel their own queries. Superusers can cancel any queries. Backend pids which queries will be canceled are selected from pg_stat_activity view, select condition determined by mask which can be defined with n hotkey.
   Shift+Del  :Terminate group of backends toggle
Terminate queries execution in group of backends with pg_terminate_backend() function. Group of backends determined using mask which specified by n toggle. Note, backends are terminated without confirmation. This function allowed only when pg_stat_activity screen enabled by a hotkey. Unprivileged users can terminate their own backends. Superusers can terminate any backends. Backend pids which will be terminated are selected from pg_stat_activity view, select condition determined by mask which can be defined with n hotkey.
   n  :Set new mask toggle
Set new mask for group cancel/terminate. Type of backends associated with their states:

active

Backend which are executing a queries.
Used condition: WHERE state = 'active' AND (
                    (clock_timestamp() - xact_start) > '00:00:10.0'::interval 
                     OR 
                    (clock_timestamp() - query_start) > '00:00:10.0'::interval
                ) AND pid <> pg_backend_pid();

idle

Backends which are do nothing and waiting for a new client command.
Used confition: WHERE state = 'idle' AND (
                    (clock_timestamp() - xact_start) > '00:00:10.0'::interval 
                     OR 
                    (clock_timestamp() - query_start) > '00:00:10.0'::interval
                ) AND pid <> pg_backend_pid();

idle_in_xact

Includes idle in transaction and idle in transaction: (aborted) states. Always a bad state.
Used condition: WHERE state IN ('idle in transaction (aborted)', 'idle in transaction') AND (
                    (clock_timestamp() - xact_start) > '00:00:10.0'::interval
                     OR
                    (clock_timestamp() - query_start) > '00:00:10.0'::interval)
                AND pid <> pg_backend_pid();

waiting

Backends which are currently waiting on a lock. Long waiting transactions or statements are bad.
Used condition: WHERE waiting AND (
                    (clock_timestamp() - xact_start) > '00:00:10.0'::interval
                     OR (clock_timestamp() - query_start) > '00:00:10.0'::interval
                ) AND pid <> pg_backend_pid();

other

backends which are executing a fast-path function call or with disabled state - when track_activities are disabled in those backends.
Used condition: WHERE state IN ('fastpath function call', 'disabled') AND (
                    (clock_timestamp() - xact_start) > '00:00:10.0'::interval
                     OR (clock_timestamp() - query_start) > '00:00:10.0'::interval
                ) AND pid <> pg_backend_pid();

A ten seconds interval used in condition determines query or transaction age and can be overriden with A hotkey.

Note, waiting is not a backend state. If a backend is in the active state, it may or may not be waiting. If the state is active and waiting is true, it means that a query is being executed, but is being blocked by a lock somewhere in the system. Therefore, if waiting added to the mask, all waiting queries will be canceled ot terminated independently of his backends states.

   m  :Display current mask toggle
Show current mask which will used for group cancel/terminate.
   A  :Change age threshold toggle
Change age threshold for long running queries. Queries which age is never then threshold not displayed. Default threshold 10 seconds. This function allowed only when pg_stat_activity screen enabled by a hotkey.
   V  :Show system tables toggle
Toggle on/off system tables and indexes. By default, the pgcenter shows table/index statistics for user tables from pg_stat_user_* views.
   K  :Reset postgresql stats toggle
Reset PostgreSQL stats counters for the current database to zero. The pg_stat_statements counters also reseted. Requires database superuser privileges.
   G  :Get query report toggle
Show query report with various information about specified query. This function work only in pg_stat_statements_timing and pg_stat_statements_general screens. For specifying query use id values from queryid column.
   z  :Change refresh interval toggle
You will be prompted to enter the delay time, in seconds, between display updates. Can not be less that 1 second.
   Z  :Change Color Mapping toggle
This key will take you to a separate screen where you can change the colors for the windows.
   space  :Pause program execution toggle
   F1  :Help toggle
Show help screen.
   q  :Quit

URLS

pg_stat_statements module
http://www.postgresql.org/docs/9.4/static/pgstatstatements.html
PostgreSQL statistics collector
http://www.postgresql.org/docs/9.4/static/monitoring-stats.html

BUGS

To report bugs, use http://github.com/lesovsky/pgbconsole/issues page

AUTHOR

Alexey Lesovsky, <lesovsky [at] gmail.com>

SEE ALSO