.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PG_ACTIVITY 1" .TH PG_ACTIVITY 1 "2020-02-14" "pg_activity 1.5.0" "Command line tool for PostgreSQL server activity monitoring." .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" pg_activity \- Realtime PostgreSQL database server monitoring tool .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBpg_activity\fR [option..] .SH "DESCRIPTION" .IX Header "DESCRIPTION" Command line tool for PostgreSQL server activity monitoring. .PP pg_activity must run on the same server than the instance and as the user running the instance (or root) to show \&\s-1CPU, MEM, READ\s0 or \s-1WRITE\s0 columns and other system information. .SH "COMMAND-LINE OPTIONS" .IX Header "COMMAND-LINE OPTIONS" .IP "\fB\-U \s-1USERNAME\s0\fR, \fB\-\-username=USERNAME\fR" 2 .IX Item "-U USERNAME, --username=USERNAME" .Vb 1 \& Database user name (default: $USER). .Ve .IP "\fB\-p \s-1PORT\s0\fR, \fB\-\-port=PORT\fR" 2 .IX Item "-p PORT, --port=PORT" .Vb 1 \& Database server port (default: "5432"). .Ve .IP "\fB\-h \s-1HOSTNAME\s0\fR, \fB\-\-host=HOSTNAME\fR" 2 .IX Item "-h HOSTNAME, --host=HOSTNAME" .Vb 1 \& Database server host or socket directory (default: "localhost"). .Ve .IP "\fB\-d \s-1DBNAME\s0\fR, \fB\-\-dbname=DBNAME\fR" 2 .IX Item "-d DBNAME, --dbname=DBNAME" .Vb 1 \& Database name to connect to (default: "postgres"). .Ve .IP "\fB\-C\fR, \fB\-\-no\-color\fR" 2 .IX Item "-C, --no-color" .Vb 1 \& Disable color usage. .Ve .IP "\fB\-\-blocksize=BLOCKSIZE\fR" 2 .IX Item "--blocksize=BLOCKSIZE" .Vb 1 \& Filesystem blocksize (default: 4096). .Ve .IP "\fB\-\-rds\fR" 2 .IX Item "--rds" .Vb 1 \& Enable support for AWS RDS. .Ve .IP "\fB\-\-output=FILEPATH\fR" 2 .IX Item "--output=FILEPATH" .Vb 1 \& Store running queries as CSV. .Ve .IP "\fB\-\-no\-db\-size\fR" 2 .IX Item "--no-db-size" .Vb 1 \& Skip total size of DB. .Ve .IP "\fB\-\-min\-duration=SECONDS\fR" 2 .IX Item "--min-duration=SECONDS" .Vb 1 \& Don\*(Aqt display queries with smaller than specified duration (in seconds). .Ve .IP "\fB\-\-verbose\-mode=VERBOSE_MODE\fR" 2 .IX Item "--verbose-mode=VERBOSE_MODE" .Vb 1 \& Queries display mode. Values: 1\-TRUNCATED, 2\-FULL(default), 3\-INDENTED .Ve .IP "\fB\-\-duration\-mode=DURATION_MODE\fR" 2 .IX Item "--duration-mode=DURATION_MODE" .Vb 1 \& Duration mode. Values: 1\-QUERY(default), 2\-TRANSACTION, 3\-BACKEND .Ve .IP "\fB\-\-help\fR" 2 .IX Item "--help" .Vb 1 \& Show this help message and exit. .Ve .IP "\fB\-\-version\fR" 2 .IX Item "--version" .Vb 1 \& Show program\*(Aqs version number and exit. .Ve .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" .IP "\fB\s-1PGPASSWORD\s0\fR" 2 .IX Item "PGPASSWORD" .Vb 1 \& PostgreSQL password. .Ve .IP "\fB\s-1PGPORT\s0\fR" 2 .IX Item "PGPORT" .Vb 1 \& Database server port. .Ve .IP "\fB\s-1PGUSER\s0\fR" 2 .IX Item "PGUSER" .Vb 1 \& Database user name. .Ve .IP "\fB\s-1PGHOST\s0\fR" 2 .IX Item "PGHOST" .Vb 1 \& Database server host or socket directory. .Ve .IP "\fB\s-1PGPASSFILE\s0\fR" 2 .IX Item "PGPASSFILE" .Vb 1 \& Path to .pgpass file (default is ~/.pgpass) .Ve .SH "DISPLAY OPTIONS" .IX Header "DISPLAY OPTIONS" .IP "\fB\-\-no\-database\fR" 2 .IX Item "--no-database" .Vb 1 \& Disable DATABASE. .Ve .IP "\fB\-\-no\-user\fR" 2 .IX Item "--no-user" .Vb 1 \& Disable USER. .Ve .IP "\fB\-\-no\-client\fR" 2 .IX Item "--no-client" .Vb 1 \& Disable CLIENT. .Ve .IP "\fB\-\-no\-cpu\fR" 2 .IX Item "--no-cpu" .Vb 1 \& Disable CPU%. .Ve .IP "\fB\-\-no\-mem\fR" 2 .IX Item "--no-mem" .Vb 1 \& Disable MEM%. .Ve .IP "\fB\-\-no\-read\fR" 2 .IX Item "--no-read" .Vb 1 \& Disable READ/s. .Ve .IP "\fB\-\-no\-write\fR" 2 .IX Item "--no-write" .Vb 1 \& Disable WRITE/s. .Ve .IP "\fB\-\-no\-time\fR" 2 .IX Item "--no-time" .Vb 1 \& Disable TIME+. .Ve .IP "\fB\-\-no\-wait\fR" 2 .IX Item "--no-wait" .Vb 1 \& Disable W. .Ve .IP "\fB\-\-no\-app\-name\fR" 2 .IX Item "--no-app-name" .Vb 1 \& Disable App. .Ve .SH "INTERACTIVE COMMANDS" .IX Header "INTERACTIVE COMMANDS" .IP "\fBC\fR Activate/deactivate colors." 2 .IX Item "C Activate/deactivate colors." .PD 0 .IP "\fBr\fR Sort by READ/s, descending." 2 .IX Item "r Sort by READ/s, descending." .IP "\fBw\fR Sort by WRITE/s, descending." 2 .IX Item "w Sort by WRITE/s, descending." .IP "\fBc\fR Sort by CPU%, descending." 2 .IX Item "c Sort by CPU%, descending." .IP "\fBm\fR Sort by MEM%, descending." 2 .IX Item "m Sort by MEM%, descending." .IP "\fBt\fR Sort by \s-1TIME+,\s0 descending." 2 .IX Item "t Sort by TIME+, descending." .IP "\fBSpace\fR Pause on/off." 2 .IX Item "Space Pause on/off." .IP "\fBv\fR Change queries display mode: full, truncated, indented" 2 .IX Item "v Change queries display mode: full, truncated, indented" .IP "\fB\s-1UP / DOWN\s0\fR Scroll process list." 2 .IX Item "UP / DOWN Scroll process list." .IP "\fBq\fR Quit" 2 .IX Item "q Quit" .IP "\fB+\fR Increase refresh time. Maximum value : 3s" 2 .IX Item "+ Increase refresh time. Maximum value : 3s" .IP "\fB\-\fR Decrease refresh time. Minimum Value : 1s" 2 .IX Item "- Decrease refresh time. Minimum Value : 1s" .IP "\fBF1/1\fR Running queries monitoring." 2 .IX Item "F1/1 Running queries monitoring." .IP "\fBF2/2\fR Waiting queries monitoring." 2 .IX Item "F2/2 Waiting queries monitoring." .IP "\fBF3/3\fR Blocking queries monitoring." 2 .IX Item "F3/3 Blocking queries monitoring." .IP "\fBh\fR Help page." 2 .IX Item "h Help page." .IP "\fBR\fR Refresh." 2 .IX Item "R Refresh." .IP "\fBD\fR Refresh database size." 2 .IX Item "D Refresh database size." .PD .SH "NAVIGATION MODE" .IX Header "NAVIGATION MODE" .IP "\fB\s-1UP\s0\fR Move up the cursor." 2 .IX Item "UP Move up the cursor." .PD 0 .IP "\fB\s-1DOWN\s0\fR Move down the cursor." 2 .IX Item "DOWN Move down the cursor." .IP "\fBk\fR Terminate the current backend/tagged backends." 2 .IX Item "k Terminate the current backend/tagged backends." .IP "\fBSpace\fR Tag or untag the process." 2 .IX Item "Space Tag or untag the process." .IP "\fBq\fR Quit." 2 .IX Item "q Quit." .IP "\fBOther\fR Back to activity." 2 .IX Item "Other Back to activity." .PD .SH "EXAMPLES" .IX Header "EXAMPLES" PGPASSWORD='mypassword' pg_activity \-U pgadmin \-h 127.0.0.1 \-\-no\-client .PP pg_activity \-h /var/run/postgresql .PP pg_activity \-h myserver \-p 5433 \-d nagios \-U nagios