.\" Man page generated from reStructuredText. . .TH PG_SYSTAT "" "" "" .SH NAME pg_systat \- display PostgreSQL statistics . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Copyright (c) 1985, 1990, 1993 . .\" The Regents of the University of California. All rights reserved. . .\" Copyright (c) 2019 PostgreSQL Global Development Group . .\" . .\" Redistribution and use in source and binary forms, with or without . .\" modification, are permitted provided that the following conditions . .\" are met: . .\" 1. Redistributions of source code must retain the above copyright . .\" notice, this list of conditions and the following disclaimer. . .\" 2. Redistributions in binary form must reproduce the above copyright . .\" notice, this list of conditions and the following disclaimer in the . .\" documentation and/or other materials provided with the distribution. . .\" 3. Neither the name of the University nor the names of its contributors . .\" may be used to endorse or promote products derived from this software . .\" without specific prior written permission. . .\" . .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND . .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE . .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE . .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE . .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL . .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS . .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) . .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT . .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY . .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF . .\" SUCH DAMAGE. . .SH SYNOPSIS .sp \fBpg_systat\fP [\fIoption...\fP] [\fIview\fP] [\fIdelay\fP] .SH DESCRIPTION .sp \fBpg_systat\fP displays various PostgreSQL statistics in a screen\-oriented fashion using the curses(3) screen display library. .sp While \fBpg_systat\fP is running, the screen is divided into different areas. The top line displays the system time. The bottom line of the screen is reserved for user input and error messages. The information displayed in the rest of the screen comprises a \fIview\fP, and is the main interface for displaying different types of PostgreSQL statistics. The \fBdbxact\fP view is the default. .sp Certain information may be discarded when the screen size is insufficient for display. For example, in an instance with 24 database the \fBdbxact\fP statistics displays only 21 databases on a 24 line terminal. .SH OPTIONS .INDENT 0.0 .TP .B \-a Display all lines. .TP .B \-B Raw, non\-interactive mode. The default is to exit after two screen updates, with statistics only ever displayed once. Useful for views such as \fBcpu\fP, where initial calculations are useless. .TP .B \-b Raw, non\-interactive mode. The default is to exit after one screen update, with statistics displayed every update. .TP .BI \-C \ count Exit after \fIcount\fP screen updates. .TP .BI \-d \ dbname Specifies the name of the database to connect to. This is equivalent to specifying dbname as the first non\-option argument on the command line. .sp If this parameter contains an = sign or starts with a valid URI prefix (postgresql:// or postgres://), it is treated as a conninfo string. .TP .BI \-h \ host Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix\-domain socket. .TP .B \-i Interactive mode. .TP .BI \-p \ port Specifies the TCP port or the local Unix\-domain socket file extension on which the server is listening for connections. Defaults to the value of the PGPORT environment variable or, if not set, to the port specified at compile time, usually 5432. .TP .BI \-s \ delay Specifies the screen refresh time interval in seconds. This option is overridden by the final \fIdelay\fP argument, if given. The default interval is 5 seconds. .TP .BI \-U \ username Connect to the database as the user \fIusername\fP instead of the default. (You must have permission to do so, of course.) .TP .BI \-w \ width Specifies the maximum width of the output in raw, non\-interactive mode. .UNINDENT .INDENT 0.0 .TP .B view The \fIview\fP argument expects to be one of: \fBdbtup\fP, or \fBdbxact\fP\&. These displays can also be requested interactively and are described in full detail below. \fIview\fP may be abbreviated to the minimum unambiguous prefix; for example, "dbx" for "dbxact". .TP .B delay The \fIdelay\fP argument specifies the screen refresh time interval in seconds. This is provided for backwards compatibility, and overrides any interval specified with the \fB\-s\fP flag. The default interval is 5 seconds. .UNINDENT .sp Certain characters cause immediate action by \fBpg_systat\fP\&. These are: .INDENT 0.0 .TP .B : Move the cursor to the command line and interpret the input line typed as a command. While entering a command the current character erase, word erase, and line kill characters may be used. .TP .B o Select the next ordering which sorts the rows according to a combination of columns. Available orderings depend on the view. Not all views support orderings. .TP .B p Pause \fBpg_systat\fP\&. .TP .B q Quit \fBpg_systat\fP\&. .TP .B r Reverse the selected ordering if supported by the view. .TP .B , Print numbers with thousand separators, where applicable. .TP .B ^A | (Home) Jump to the beginning of the current view. .TP .B ^B | (right arrow) Select the previous view. .TP .B ^E | (End) Jump to the end of the current view. .TP .B ^F | (left arrow) Select the next view. .TP .B ^G Print the name of the current view being shown and the refresh interval. .TP .B ^L Refresh the screen. .TP .B ^N | (down arrow) Scroll current view down by one line. .TP .B ^P | (up arrow) Scroll current view up by one line. .TP .B ^V | (Page Down) Scroll current view down by one page. .TP .B Alt\-V | (Page Up) Scroll current view up by one page. .TP .B ^Z Suspend \fBpg_systat\fP\&. .UNINDENT .sp The following commands are interpreted by the "global" command interpreter. .INDENT 0.0 .TP .B help Print the names of the available views on the command line. .TP .B order Print the names of the available orderings on the command line. .TP .B quit Quit \fBpg_systat\fP\&. (This may be abbreviated to \fIq\fP\&.) .TP .B stop Stop refreshing the screen. .TP .B [start] [number] Start (continue) refreshing the screen. If a second, numeric, argument is provided it is interpreted as a refresh interval (in seconds). Supplying only a number will set the refresh interval to this value. .UNINDENT .sp \fIview\fP may be abbreviated to the minimum unambiguous prefix. The available views are: .INDENT 0.0 .TP .B dbblk Display database block statistics: .INDENT 7.0 .TP .B DATABASE name of the database .TP .B READ disk blocks read .TP .B READ/s disk blocks read per second .TP .B HIT disk blocks found in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system\(aqs file system cache) .TP .B HIT% percentage of total (READ + HIT) blocks read from the PostgreSQL buffer cache .TP .B R_TIME time spent reading data file blocks by backends, in milliseconds .TP .B W_TIME time spent writing data file blocks by backends, in milliseconds .TP .B TMP_FILES temporary files created by queries .TP .B TMP_BYTES data written to temporary files by queries .UNINDENT .TP .B dbconfl .INDENT 7.0 .TP .B Display database conflicts with recovery (applies only to standby servers) .UNINDENT .INDENT 7.0 .TP .B CONFLICTS queries canceled due to conflicts .TP .B TABLESPACE queries canceled due to dropped tablespaces .TP .B LOCK queries canceled due to lock timeouts .TP .B SNAPSHOT queries canceled due to old snapshots .TP .B BUFFERPIN queries canceled due to pinned buffers .TP .B DEADLOCK queries canceled due to deadlocks .UNINDENT .TP .B dbtup Display database tuple statistics: .INDENT 7.0 .TP .B DATABASE name of the database .TP .B R/s FETCHED rows per second .TP .B W/s rows modified (INSERTED + UPDATED + DELETED) per second .TP .B RETURNED rows returned by queries .TP .B FETCHED rows fetched by queries .TP .B INSERTED rows inserted by queries .TP .B UPDATED rows updated by queries .TP .B DELETED rows deleted by queries .UNINDENT .TP .B dbxact Display database transaction statistics: .INDENT 7.0 .TP .B DATABASE name of the database .TP .B CONNECTIONS backends currently connected .TP .B COMMIT transactions that have been committed .TP .B COMMIT/s committed transaction rate per second .TP .B ROLLBACK transactions that have been rolled back .TP .B ROLLBACK/s rolled back transaction rate per second .TP .B DEADLOCKS deadlocks detected .UNINDENT .TP .B index Display index statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B INDEXNAME index name .TP .B TABLENAME table name .TP .B IDX_SCAN number of index scans initiated on this index .TP .B IDX_TUP_READ number of index entries returned by scans on this index .TP .B IDX_TUP_FETCH number of live table rows fetched by simple index scans using this index .UNINDENT .TP .B indexio Display index I/O statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B INDEXNAME index name .TP .B TABLENAME table name .TP .B IDX_BLKS_READ disk blocks read from this index .TP .B IDX_BLKS_HIT buffer hits in this index .UNINDENT .TP .B tableanalyze Display table analyze statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B N_MOD_SINCE_ANALYZE estimated number of rows modified since this table was last analyzed .TP .B LAST_ANALYZE last time this table was manually vacuumed (not counting VACUUM FULL) .TP .B LAST_AUTOANALYZE last time this table was vacuumed by the autovacuum daemon .TP .B ANALYZE_COUNT number of times this table has been manually vacuumed (not counting VACUUM FULL) .TP .B AUTOANALYZE_COUNT number of times this table has been vacuumed by the autovacuum daemon .UNINDENT .TP .B tableioheap Display table heap I/O statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B HEAP_BLKS_READ disk blocks read from this table .TP .B HEAP_BLKS_HIT buffer hits in this table .UNINDENT .TP .B tableioidx Display table index I/O statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B IDX_BLKS_READ disk blocks read from all indexes on this table .TP .B IDX_BLKS_HIT buffer hits in all indexes on this table .UNINDENT .TP .B tableiotidx Display toast table index I/O statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B TIDX_BLKS_READ disk blocks read from this table\(aqs TOAST table indexes (if any) .TP .B TIDX_BLKS_HIT of buffer hits in this table\(aqs TOAST table indexes (if any) .UNINDENT .TP .B tableiotoast Display toast table I/O statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B TOAST_BLKS_READ disk blocks read from this table\(aqs TOAST table (if any) .TP .B TOAST_BLKS_HIT buffer hits in this table\(aqs TOAST table (if any) .UNINDENT .TP .B tablescan Display table and index scan statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B SEQ_SCAN number of sequential scans .TP .B SEQ_TUP_READ number of live rows fetched by sequential scans .TP .B IDX_SCAN number of index scans .TP .B IDX_TUP_FETCH number of live rows fetched by index scans .UNINDENT .TP .B tabletup Display table row modification statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B INS rows inserted .TP .B UPD rows updated (includes HOT updated rows) .TP .B DEL rows deleted .TP .B HOT_UPD rows HOT updated (i.e., with no separate index update required) .TP .B LIVE estimated number of live rows .TP .B DEAD estimated number of dead rows .UNINDENT .TP .B tablevac Display table vacuum statistics: .INDENT 7.0 .TP .B SCHEMA schema name .TP .B NAME table name .TP .B LAST_VACUUM last time this table was manually vacuumed (not counting VACUUM FULL) .TP .B LAST_AUTOVACUUM last time this table was vacuumed by the autovacuum daemon .TP .B VACUUM_COUNT number of times this table has been manually vacuumed (not counting VACUUM FULL) .TP .B AUTOVACUUM_COUNT number of times this table has been vacuumed by the autovacuum daemon .UNINDENT .UNINDENT .SH SEE ALSO .sp pg_top(1) .SH HISTORY .sp The \fBpg_systat\fP program was adapted from systat. .\" Generated by docutils manpage writer. .