File: test_cli_help.txt

package info (click to toggle)
pg-activity 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,144 kB
  • sloc: python: 3,902; sql: 1,067; sh: 5; makefile: 2
file content (91 lines) | stat: -rw-r--r-- 3,969 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
>>> import sys
>>> import pytest
>>> if sys.version_info < (3, 13):
...     pytest.skip("only applies for Python version >= 3.13")
...

>>> from pgactivity import cli
>>> parser = cli.get_parser(prog="pg_activity")
>>> parser.print_help()
usage: pg_activity [options] [connection string]
<BLANKLINE>
htop like application for PostgreSQL server activity monitoring.
<BLANKLINE>
Configuration:
  -P, --profile PROFILE
                        Configuration profile matching a PROFILE.conf file in
                        ${XDG_CONFIG_HOME:~/.config}/pg_activity/ or
                        /etc/pg_activity/, or a built-in profile.
<BLANKLINE>
Options:
  --blocksize BLOCKSIZE
                        Filesystem blocksize (default: 4096).
  --rds                 Enable support for AWS RDS (implies --no-tempfiles and
                        filters out the rdsadmin database from space
                        calculation).
  --output FILEPATH     Store running queries as CSV.
  --db-size, --no-db-size
                        Enable/disable total size of DB.
  --tempfiles, --no-tempfiles
                        Enable/disable tempfile count and size.
  --walreceiver, --no-walreceiver
                        Enable/disable walreceiver checks.
  -w, --wrap-query      Wrap query column instead of truncating.
  --duration-mode DURATION_MODE
                        Duration mode. Values: 1-QUERY(default),
                        2-TRANSACTION, 3-BACKEND.
  --min-duration SECONDS
                        Don't display queries with smaller than specified
                        duration (in seconds).
  --filter FIELD:REGEX  Filter activities with a (case insensitive) regular
                        expression applied on selected fields. Known fields
                        are: dbname.
  --debug-file DEBUG_FILE
                        Enable debug and write it to DEBUG_FILE.
  --version             show program's version number and exit.
  --help                Show this help message and exit.
<BLANKLINE>
Connection Options:
  connection string     A valid connection string to the database, e.g.:
                        'host=HOSTNAME port=PORT user=USER dbname=DBNAME'.
  -h, --host HOSTNAME   Database server host or socket directory.
  -p, --port PORT       Database server port.
  -U, --username USERNAME
                        Database user name.
  -d, --dbname DBNAME   Database name to connect to.
<BLANKLINE>
Process table display options:
  These options may be used hide some columns from the processes table.
<BLANKLINE>
  --pid, --no-pid       Enable/disable PID.
  --xmin, --no-xmin     Enable/disable XMIN.
  --database, --no-database
                        Enable/disable DATABASE.
  --user, --no-user     Enable/disable USER.
  --client, --no-client
                        Enable/disable CLIENT.
  --cpu, --no-cpu       Enable/disable CPU%.
  --mem, --no-mem       Enable/disable MEM%.
  --read, --no-read     Enable/disable READ/s.
  --write, --no-write   Enable/disable WRITE/s.
  --time, --no-time     Enable/disable TIME+.
  --wait, --no-wait     Enable/disable W.
  --app-name, --no-app-name
                        Enable/disable APP.
<BLANKLINE>
Header display options:
  --no-inst-info        Hide instance information.
  --no-sys-info         Hide system information.
  --no-proc-info        Hide workers process information.
<BLANKLINE>
Other display options:
  --hide-queries-in-logs
                        Disable log_min_duration_statements and
                        log_min_duration_sample for pg_activity.
  --refresh REFRESH     Refresh rate. Values: 0.5, 1, 2, 3, 4, 5 (default: 2).
<BLANKLINE>
The connection string can be in the form of a list of Key/Value parameters or
an URI as described in the PostgreSQL documentation. The parsing is delegated
to the libpq: different versions of the client library may support different
formats or parameters (for example, connection URIs are only supported from
libpq 9.2).