diff -Nru pg-activity-2.1.0/AUTHORS.md pg-activity-2.2.1/AUTHORS.md --- pg-activity-2.1.0/AUTHORS.md 2021-03-08 15:02:38.000000000 +0000 +++ pg-activity-2.2.1/AUTHORS.md 2021-08-05 09:21:31.000000000 +0000 @@ -3,9 +3,10 @@ pg_activity is an open project. Feel free to join us and improve this tool. -## Maintainer +## Maintainers - Benoit Lobréau +- Denis Laxalde ## Contributors diff -Nru pg-activity-2.1.0/debian/changelog pg-activity-2.2.1/debian/changelog --- pg-activity-2.1.0/debian/changelog 2021-03-08 20:02:04.000000000 +0000 +++ pg-activity-2.2.1/debian/changelog 2021-09-11 07:09:05.000000000 +0000 @@ -1,3 +1,11 @@ +pg-activity (2.2.1-1) unstable; urgency=medium + + * New upstream release + * Bump Standards-Version to 4.6.0.1 + * Remove useless HomePage field in upstream/metadata + + -- Emmanuel Bouthenot Sat, 11 Sep 2021 07:09:05 +0000 + pg-activity (2.1.0-1) unstable; urgency=medium * New upstream release diff -Nru pg-activity-2.1.0/debian/control pg-activity-2.2.1/debian/control --- pg-activity-2.1.0/debian/control 2021-03-03 15:23:44.000000000 +0000 +++ pg-activity-2.2.1/debian/control 2021-09-11 07:09:05.000000000 +0000 @@ -7,7 +7,7 @@ python3, python3-setuptools, dh-python -Standards-Version: 4.5.1 +Standards-Version: 4.6.0.1 Homepage: https://github.com/julmon/pg_activity Vcs-Git: https://salsa.debian.org/kolter/pg-activity.git Vcs-Browser: https://salsa.debian.org/kolter/pg-activity diff -Nru pg-activity-2.1.0/debian/patches/fix_typo_manpage.patch pg-activity-2.2.1/debian/patches/fix_typo_manpage.patch --- pg-activity-2.1.0/debian/patches/fix_typo_manpage.patch 1970-01-01 00:00:00.000000000 +0000 +++ pg-activity-2.2.1/debian/patches/fix_typo_manpage.patch 2021-09-11 07:09:05.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Fix typo in manpage +Author: Emmanuel Bouthenot +Forwarded: https://github.com/dalibo/pg_activity/pull/238 +Last-Update: 2021-09-11 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/docs/man/pg_activity.1 ++++ b/docs/man/pg_activity.1 +@@ -246,7 +246,7 @@ + .SS "\s-1THE BLOCKING QUERIES PANNEL\s0" + .IX Subsection "THE BLOCKING QUERIES PANNEL" + The blocking queries view displays the queries that lock an object which is +-requiered by another session. It shows following information: ++required by another session. It shows following information: + .IP "\- \fB\s-1PID\s0\fR: process id of the backend which executes the query;" 2 + .IX Item "- PID: process id of the backend which executes the query;" + .PD 0 +--- a/docs/man/pg_activity.pod ++++ b/docs/man/pg_activity.pod +@@ -117,7 +117,7 @@ + =head2 THE BLOCKING QUERIES PANNEL + + The blocking queries view displays the queries that lock an object which is +-requiered by another session. It shows following information: ++required by another session. It shows following information: + + =over 2 + diff -Nru pg-activity-2.1.0/debian/patches/series pg-activity-2.2.1/debian/patches/series --- pg-activity-2.1.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ pg-activity-2.2.1/debian/patches/series 2021-09-11 07:09:05.000000000 +0000 @@ -0,0 +1 @@ +fix_typo_manpage.patch diff -Nru pg-activity-2.1.0/debian/upstream/metadata pg-activity-2.2.1/debian/upstream/metadata --- pg-activity-2.1.0/debian/upstream/metadata 2020-09-19 08:00:01.000000000 +0000 +++ pg-activity-2.2.1/debian/upstream/metadata 2021-09-11 07:09:05.000000000 +0000 @@ -1,4 +1,3 @@ -Homepage: https://github.com/julmon/pg_activity Repository: https://github.com/julmon/pg_activity.git Repository-Browse: https://github.com/julmon/pg_activity Bug-Database: https://github.com/julmon/pg_activity/issues diff -Nru pg-activity-2.1.0/docs/man/build-man.sh pg-activity-2.2.1/docs/man/build-man.sh --- pg-activity-2.1.0/docs/man/build-man.sh 2021-03-08 15:02:38.000000000 +0000 +++ pg-activity-2.2.1/docs/man/build-man.sh 2021-08-05 09:21:31.000000000 +0000 @@ -1,3 +1,5 @@ #!/bin/bash -pod2man -r "pg_activity 2.0.3" -d `date +%Y-%m-%d` -c "Command line tool for PostgreSQL server activity monitoring." pg_activity.pod > pg_activity.1; +version=$(python3 ../../setup.py --version) + +pod2man -r "pg_activity ${version}" -d `date +%Y-%m-%d` -c "Command line tool for PostgreSQL server activity monitoring." pg_activity.pod > pg_activity.1; diff -Nru pg-activity-2.1.0/docs/man/pg_activity.1 pg-activity-2.2.1/docs/man/pg_activity.1 --- pg-activity-2.1.0/docs/man/pg_activity.1 2021-03-08 15:02:38.000000000 +0000 +++ pg-activity-2.2.1/docs/man/pg_activity.1 2021-08-05 09:21:31.000000000 +0000 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PG_ACTIVITY 1" -.TH PG_ACTIVITY 1 "2021-01-27" "pg_activity 2.0.3" "Command line tool for PostgreSQL server activity monitoring." +.TH PG_ACTIVITY 1 "2021-08-05" "pg_activity 2.2.1" "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 @@ -147,30 +147,154 @@ .IX Header "DESCRIPTION" Command line tool for PostgreSQL server activity monitoring. .PP -pg_activity must run on the same server than the instance and +pg_activity must run on the same server as 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. +.SS "\s-1THE HEADER\s0" +.IX Subsection "THE HEADER" +The first line of the header displays PostgreSQL's version, the host name, the +connection string and the refresh rate. +.PP +The rest of the header displays the following information: +.IP "\- \fBSize\fR: size of the database you are connected to \- Growth in B/s;" 2 +.IX Item "- Size: size of the database you are connected to - Growth in B/s;" +.PD 0 +.IP "\- \fBMem.\fR: percentage of memory used \- memory used / memory available;" 2 +.IX Item "- Mem.: percentage of memory used - memory used / memory available;" +.IP "\- \fBSwap\fR: percentage of swap used \- swap used / swap available;" 2 +.IX Item "- Swap: percentage of swap used - swap used / swap available;" +.IP "\- \fBLoad\fR: \s-1CPU\s0 load;" 2 +.IX Item "- Load: CPU load;" +.IP "\- \fB\s-1TPS\s0\fR: transaction per second (sum of commit & rollback for all databases / time elapsed since last snap);" 2 +.IX Item "- TPS: transaction per second (sum of commit & rollback for all databases / time elapsed since last snap);" +.IP "\- \fB\s-1IO\s0 Max\fR: the number of \s-1IO\s0 per second (aggregated data gathered with the psutil library);" 2 +.IX Item "- IO Max: the number of IO per second (aggregated data gathered with the psutil library);" +.IP "\- \fBRead\fR: current Read throughput (aggregated data gathered with the psutil library);" 2 +.IX Item "- Read: current Read throughput (aggregated data gathered with the psutil library);" +.IP "\- \fBWrite\fR: current Write throughput (aggregated data gathered with the psutil library);" 2 +.IX Item "- Write: current Write throughput (aggregated data gathered with the psutil library);" +.IP "\- \fBActive connections\fR: number of active connections;" 2 +.IX Item "- Active connections: number of active connections;" +.IP "\- \fBDuration mode\fR: query, transaction or backend." 2 +.IX Item "- Duration mode: query, transaction or backend." +.PD +.SS "\s-1THE RUNNING QUERIES PANEL\s0" +.IX Subsection "THE RUNNING QUERIES PANEL" +The running queries panel shows all running queries, transactions or backends +(depending on the \fB\s-1DURATION_MODE\s0\fR setting) which have lasted for more than +\&\fBmin duration\fR seconds. It displays the following information: +.IP "\- \fB\s-1PID\s0\fR: process id of the backend which executes the query;" 2 +.IX Item "- PID: process id of the backend which executes the query;" +.PD 0 +.IP "\- \fB\s-1DATABASE\s0\fR: database specified in the connection string;" 2 +.IX Item "- DATABASE: database specified in the connection string;" +.IP "\- \fB\s-1APP\s0\fR: application name specified in the connection string;" 2 +.IX Item "- APP: application name specified in the connection string;" +.IP "\- \fB\s-1USER\s0\fR: user name specified in the connection string;" 2 +.IX Item "- USER: user name specified in the connection string;" +.ie n .IP "\- \fB\s-1CLIENT\s0\fR: client address or ""local"" in case of linux socker connection;" 2 +.el .IP "\- \fB\s-1CLIENT\s0\fR: client address or ``local'' in case of linux socker connection;" 2 +.IX Item "- CLIENT: client address or local in case of linux socker connection;" +.IP "\- \fBCPU%\fR: percentage of \s-1CPU\s0 used by the backend as reported by the psutil library;" 2 +.IX Item "- CPU%: percentage of CPU used by the backend as reported by the psutil library;" +.IP "\- \fBMEM%\fR: percentage of memory used by the backend as reported by the psutil library;" 2 +.IX Item "- MEM%: percentage of memory used by the backend as reported by the psutil library;" +.IP "\- \fBREAD/s\fR: read thruput as reported by the psutil library;" 2 +.IX Item "- READ/s: read thruput as reported by the psutil library;" +.IP "\- \fBWRITE/s\fR: write thruput as reported by the psutil library;" 2 +.IX Item "- WRITE/s: write thruput as reported by the psutil library;" +.IP "\- \fB\s-1TIME\s0\fR: time since the beginning of the query / transaction / backend start depending on the \fB\s-1DURATION_MODE\s0\fR currently in use;" 2 +.IX Item "- TIME: time since the beginning of the query / transaction / backend start depending on the DURATION_MODE currently in use;" +.IP "\- \fBWaiting\fR: for PostgreSQL 9.6+: a specific wait event or nothing. Otherwise, a boolean indicating if we are waiting for a Lock;" 2 +.IX Item "- Waiting: for PostgreSQL 9.6+: a specific wait event or nothing. Otherwise, a boolean indicating if we are waiting for a Lock;" +.IP "\- \fB\s-1IOW\s0\fR: boolean indicating that the process is waiting for \s-1IO\s0 as reported by the psutil library;" 2 +.IX Item "- IOW: boolean indicating that the process is waiting for IO as reported by the psutil library;" +.IP "\- \fBstate\fR: state of the backend;" 2 +.IX Item "- state: state of the backend;" +.IP "\- \fBQuery\fR: the query." 2 +.IX Item "- Query: the query." +.PD +.SS "\s-1THE WAITING QUERIES PANNEL\s0" +.IX Subsection "THE WAITING QUERIES PANNEL" +The waiting queries view displays queries that are wainting for a lock. It +shows the following information: +.IP "\- \fB\s-1PID\s0\fR: process id of the backend which executes the query;" 2 +.IX Item "- PID: process id of the backend which executes the query;" +.PD 0 +.IP "\- \fB\s-1DATABASE\s0\fR: database specified in the connection string;" 2 +.IX Item "- DATABASE: database specified in the connection string;" +.IP "\- \fB\s-1APP\s0\fR: application name specified in the connection string;" 2 +.IX Item "- APP: application name specified in the connection string;" +.IP "\- \fB\s-1USER\s0\fR: user name specified in the connection string;" 2 +.IX Item "- USER: user name specified in the connection string;" +.ie n .IP "\- \fB\s-1CLIENT\s0\fR: client address or ""local"" in case of linux socker connection;" 2 +.el .IP "\- \fB\s-1CLIENT\s0\fR: client address or ``local'' in case of linux socker connection;" 2 +.IX Item "- CLIENT: client address or local in case of linux socker connection;" +.IP "\- \fB\s-1RELATION\s0\fR: the name of the relation being locked if applicable;" 2 +.IX Item "- RELATION: the name of the relation being locked if applicable;" +.IP "\- \fB\s-1TYPE\s0\fR: the type of lock;" 2 +.IX Item "- TYPE: the type of lock;" +.IP "\- \fB\s-1MODE\s0\fR: the mode of the lock;" 2 +.IX Item "- MODE: the mode of the lock;" +.IP "\- \fB\s-1TIME+\s0\fR: the duration of the query, transaction or session depending on the \fB\s-1DURATION_MODE\s0\fR setting;" 2 +.IX Item "- TIME+: the duration of the query, transaction or session depending on the DURATION_MODE setting;" +.IP "\- \fBstate\fR: the state of the transaction;" 2 +.IX Item "- state: the state of the transaction;" +.IP "\- \fBQuery\fR: the query." 2 +.IX Item "- Query: the query." +.PD +.SS "\s-1THE BLOCKING QUERIES PANNEL\s0" +.IX Subsection "THE BLOCKING QUERIES PANNEL" +The blocking queries view displays the queries that lock an object which is +requiered by another session. It shows following information: +.IP "\- \fB\s-1PID\s0\fR: process id of the backend which executes the query;" 2 +.IX Item "- PID: process id of the backend which executes the query;" +.PD 0 +.IP "\- \fB\s-1DATABASE\s0\fR: database specified in the connection string;" 2 +.IX Item "- DATABASE: database specified in the connection string;" +.IP "\- \fB\s-1APP\s0\fR: application name specified in the connection string;" 2 +.IX Item "- APP: application name specified in the connection string;" +.IP "\- \fB\s-1USER\s0\fR: user name specified in the connection string;" 2 +.IX Item "- USER: user name specified in the connection string;" +.ie n .IP "\- \fB\s-1CLIENT\s0\fR: client address or ""local"" in case of linux socker connection;" 2 +.el .IP "\- \fB\s-1CLIENT\s0\fR: client address or ``local'' in case of linux socker connection;" 2 +.IX Item "- CLIENT: client address or local in case of linux socker connection;" +.IP "\- \fB\s-1RELATION\s0\fR: the name of the relation being locked if applicable;" 2 +.IX Item "- RELATION: the name of the relation being locked if applicable;" +.IP "\- \fB\s-1TYPE\s0\fR: the type of lock;" 2 +.IX Item "- TYPE: the type of lock;" +.IP "\- \fB\s-1MODE\s0\fR: the mode of the lock;" 2 +.IX Item "- MODE: the mode of the lock;" +.IP "\- \fB\s-1TIME+\s0\fR: the duration of the query, transaction or session depending on the \fB\s-1DURATION_MODE\s0\fR setting;" 2 +.IX Item "- TIME+: the duration of the query, transaction or session depending on the DURATION_MODE setting;" +.IP "\- \fBWaiting\fR: for PostgreSQL 9.6+: a specific wait event or nothing. Otherwise, a boolean indicating if we are waiting for a Lock;" 2 +.IX Item "- Waiting: for PostgreSQL 9.6+: a specific wait event or nothing. Otherwise, a boolean indicating if we are waiting for a Lock;" +.IP "\- \fBstate\fR: the state of the transaction;" 2 +.IX Item "- state: the state of the transaction;" +.IP "\- \fBQuery\fR: the query." 2 +.IX Item "- Query: the query." +.PD .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). +\& Database user name. .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"). +\& Database server port. .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"). +\& Database server host or socket directory. .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"). +\& Database name to connect to. .Ve .IP "\fB\-\-blocksize=BLOCKSIZE\fR" 2 .IX Item "--blocksize=BLOCKSIZE" @@ -192,13 +316,8 @@ .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" +.IP "\fB\-w \s-1DISPLAY_MODE,\s0 \-\-query\-display\-mode=DISPLAY_MODE\fR" 2 +.IX Item "-w DISPLAY_MODE, --query-display-mode=DISPLAY_MODE" .Vb 1 \& Queries display mode. Values: 1\-TRUNCATED, 2\-FULL(default), 3\-INDENTED .Ve @@ -207,6 +326,11 @@ .Vb 1 \& Duration mode. Values: 1\-QUERY(default), 2\-TRANSACTION, 3\-BACKEND .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\-\-help\fR" 2 .IX Item "--help" .Vb 1 @@ -219,31 +343,12 @@ .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 +.RS 2 +All the environnement variables supported by libpq (PostgreSQL's query +protocol) are supported by pg_activity. +.Sp +See: https://www.postgresql.org/docs/current/libpq\-envars.html +.RE .SH "DISPLAY OPTIONS" .IX Header "DISPLAY OPTIONS" .IP "\fB\-\-no\-pid\fR" 2 @@ -326,10 +431,10 @@ .IX Item "k / j 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 "\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 diff -Nru pg-activity-2.1.0/docs/man/pg_activity.pod pg-activity-2.2.1/docs/man/pg_activity.pod --- pg-activity-2.1.0/docs/man/pg_activity.pod 2021-03-08 15:02:38.000000000 +0000 +++ pg-activity-2.2.1/docs/man/pg_activity.pod 2021-08-05 09:21:31.000000000 +0000 @@ -10,29 +10,162 @@ Command line tool for PostgreSQL server activity monitoring. -pg_activity must run on the same server than the instance and +pg_activity must run on the same server as the instance and as the user running the instance (or root) to show CPU, MEM, READ or WRITE columns and other system information. +=head2 THE HEADER + +The first line of the header displays PostgreSQL's version, the host name, the +connection string and the refresh rate. + +The rest of the header displays the following information: + +=over 2 + +=item - B: size of the database you are connected to - Growth in B/s; + +=item - B: percentage of memory used - memory used / memory available; + +=item - B: percentage of swap used - swap used / swap available; + +=item - B: CPU load; + +=item - B: transaction per second (sum of commit & rollback for all databases / time elapsed since last snap); + +=item - B: the number of IO per second (aggregated data gathered with the psutil library); + +=item - B: current Read throughput (aggregated data gathered with the psutil library); + +=item - B: current Write throughput (aggregated data gathered with the psutil library); + +=item - B: number of active connections; + +=item - B: query, transaction or backend. + +=back + +=head2 THE RUNNING QUERIES PANEL + +The running queries panel shows all running queries, transactions or backends +(depending on the B setting) which have lasted for more than +B seconds. It displays the following information: + +=over 2 + +=item - B: process id of the backend which executes the query; + +=item - B: database specified in the connection string; + +=item - B: application name specified in the connection string; + +=item - B: user name specified in the connection string; + +=item - B: client address or "local" in case of linux socker connection; + +=item - B: percentage of CPU used by the backend as reported by the psutil library; + +=item - B: percentage of memory used by the backend as reported by the psutil library; + +=item - B: read thruput as reported by the psutil library; + +=item - B: write thruput as reported by the psutil library; + +=item - B