Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
darold committed Dec 26, 2022
1 parent 1ab2632 commit 5a2cfaf
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 102 deletions.
96 changes: 43 additions & 53 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ COLLECTING STATISTICS
-E, --end-after=NUM self terminate the program after a given number of
seconds. Can be written: 7200 or 120M or 2H, for
days use 7D for example to stop collecting data
after seven days.
after seven days.
-f, --pid-file=FILE path to pid file. Default: /var/run/postgresql/pgcluu_collectd.pid.
-h, --host=HOSTNAME database server host or socket directory
-i, --interval=NUM time to wait between runs
-k, --kill stop current pgcluu_collectd running daemon.
-m, --metric=METRIC set a coma separated list of metrics to perform.
-M, --max-size=SIZE self terminate program when the size of the output
directory exceed a given size. Can be written: 2GB
or 2000MB.
or 2000MB.
-p, --port=PORT database port(s) to connect to. Defaults to 5432.
-P, --psql=BIN path to the psql command. Default: psql.
-Q, --no-statement do not collect statistics from pg_stat_statements.
Expand All @@ -316,7 +316,7 @@ COLLECTING STATISTICS
in a comma separated list of database names.
--list-metric list available metrics actions that can be performed.
--sysinfo get operating system infos and exit (sysinfo.txt).
--no-sysinfo do not collect operating system information at all.
--no-sysinfo do not collect operating system information at all.
--no-database do not collect database statistics at all.
--pgbouncer-args=OPTIONS Option to used to connect to the pgbouncer system
database. Ex: -p 6432 -U postgres -h 192.168.1.100
Expand Down Expand Up @@ -523,55 +523,45 @@ GENERATING REPORTS
input_dir: directory where pgcluu_collectd or pgstats and sar data
files are stored.

options:

-b, --begin datetime start date/time for the data to be parsed.
-C, --cache generate cache files only (.bin), no html output.
-d, --db-only dbname only report for the whole cluster and the given
database name. You can use it multiple time or
give a comma separated list of database name.
-D, --device-only dev only report I/O stats for a particular device
You can use it multiple time or give a comma
separated list of device name, ex: sda,sdc.
-e, --end datetime end date/time for the data to be parsed.
-i, --sar-file=FILE path to the sar text data file to read to generate
system reports. Default to input_dir/sar_stats.dat.
-I, --sadc-file=FILE sadc binary data file to read to generate system
reports. Default to input_dir/sadc_stats.dat.
-n, --top-number Top number of tables or indexes I/O stats to show.
Default is set to top 10. Set it to 0 to show all.
-N, --network-only iface only report stats for a particular network interface.
You can use it multiple times or give a comma separated
list of network interfaces, ex: eth0,eth1.
-o, --output=DIR output directory
-r, --reverse-date By default pgcluu look at mm/dd/yy format in sar file.
When enabled pgcluu will look at dd/mm/yy format.
-s, --sadf=BIN path to the sadf sysstat command used to read the
sadc binary data file. Default: /usr/bin/sadf.
-S, --disable-sar disable collect of system statistics with sar.
-t, --with-table table Only report for the whole tables and the given
table name. You can use it multiple time or
give a comma separated list of database name.
-T, --no-table Do not report statistics related to tables.
-v, --verbose Print out debug informations.
-V, --version Show pgcluu version and exit.
-x, --external-menu Save menu in menu.html and load it into each report
using w3-include-html attribut from w3.js. This will
only work if acces to HTML reports is through a Web
server, not using the file:// protocol.
-z, --timezone +/-XX Set the number of hour(s) from GMT of the timezone.
Use this to adjust date/time from the sar output,
pgcluu use GMT time to draw charts.
-Z, --stats-timezone +/-XX Set the number of hour(s) from GMT of the timezone.
Use this to adjust date/time from the cluster and
system stats output, pgcluu use GMT time.
--from-sa-file instruct pgcluu that file specified by the -i option
uses the standard system activity daily data file.
--charset used to set the HTML charset to be used.
Default: utf-8.
--retention NDAYS number of rolling days to keep in report directory.
Default is to store indefinitely.
--help print usage
options: -b, --begin datetime start date/time for the data to be parsed
(time of current timezone). -C, --cache generate cache files only
(.bin), no html output. -d, --db-only dbname only report for the whole
cluster and the given database name. You can use it multiple time or
give a comma separated list of database name. -D, --device-only dev only
report I/O stats for a particular device You can use it multiple time or
give a comma separated list of device name, ex: sda,sdc. -e, --end
datetime end date/time for the data to be parsed (time of current
timezone). -i, --sar-file=FILE path to the sar text data file to read to
generate system reports. Default to input_dir/sar_stats.dat. -I,
--sadc-file=FILE sadc binary data file to read to generate system
reports. Default to input_dir/sadc_stats.dat. -n, --top-number Top
number of tables or indexes I/O stats to show. Default is set to top 10.
Set it to 0 to show all. -N, --network-only iface only report stats for
a particular network interface. You can use it multiple times or give a
comma separated list of network interfaces, ex: eth0,eth1. -o,
--output=DIR output directory -r, --reverse-date By default pgcluu look
at mm/dd/yy format in sar file. When enabled pgcluu will look at
dd/mm/yy format. -s, --sadf=BIN path to the sadf sysstat command used to
read the sadc binary data file. Default: /usr/bin/sadf. -S,
--disable-sar disable collect of system statistics with sar. -t,
--with-table table Only report for the whole tables and the given table
name. You can use it multiple time or give a comma separated list of
database name. -T, --no-table Do not report statistics related to
tables. -v, --verbose Print out debug informations. -V, --version Show
pgcluu version and exit. -x, --external-menu Save menu in menu.html and
load it into each report using w3-include-html attribut from w3.js. This
will only work if acces to HTML reports is through a Web server, not
using the file:// protocol. -z, --timezone +/-XX Set the number of
hour(s) from GMT of the timezone, Eg: -z +02 Usually autodetected. Use
this to adjust date/time from the sar output, pgcluu use GMT time to
draw charts. -Z, --stats-timezone +/-XX Set the number of hour(s) from
GMT of the timezone. Eg: -Z +02 Usually autodetected. Use this to adjust
date/time from the cluster and system stats output, pgcluu use GMT time.
--from-sa-file instruct pgcluu that file specified by the -i option uses
the standard system activity daily data file. --charset used to set the
HTML charset to be used. Default: utf-8. --retention NDAYS number of
rolling days to keep in report directory. Default is to store
indefinitely. --help print usage

For example, you can generate all HTML reports from data files stored
into /tmp/stat_db1/ with the following commands:
Expand Down Expand Up @@ -702,7 +692,7 @@ GENERATING REPORTS
configuration directive in pgcluu.conf

LICENSE
Copyright (c) 2012-2022, Gilles Darold
Copyright (c) 2012-2021, Gilles Darold

pgCluu is licenced under the PostgreSQL Licence a liberal Open Source
license, similar to the BSD or MIT licenses. That mean that all parts of
Expand Down
101 changes: 52 additions & 49 deletions doc/pgCluu.pod
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,15 @@ options:
-E, --end-after=NUM self terminate the program after a given number of
seconds. Can be written: 7200 or 120M or 2H, for
days use 7D for example to stop collecting data
after seven days.
after seven days.
-f, --pid-file=FILE path to pid file. Default: /var/run/postgresql/pgcluu_collectd.pid.
-h, --host=HOSTNAME database server host or socket directory
-i, --interval=NUM time to wait between runs
-k, --kill stop current pgcluu_collectd running daemon.
-m, --metric=METRIC set a coma separated list of metrics to perform.
-M, --max-size=SIZE self terminate program when the size of the output
directory exceed a given size. Can be written: 2GB
or 2000MB.
or 2000MB.
-p, --port=PORT database port(s) to connect to. Defaults to 5432.
-P, --psql=BIN path to the psql command. Default: psql.
-Q, --no-statement do not collect statistics from pg_stat_statements.
Expand All @@ -321,7 +321,7 @@ options:
in a comma separated list of database names.
--list-metric list available metrics actions that can be performed.
--sysinfo get operating system infos and exit (sysinfo.txt).
--no-sysinfo do not collect operating system information at all.
--no-sysinfo do not collect operating system information at all.
--no-database do not collect database statistics at all.
--pgbouncer-args=OPTIONS Option to used to connect to the pgbouncer system
database. Ex: -p 6432 -U postgres -h 192.168.1.100
Expand Down Expand Up @@ -531,54 +531,57 @@ usage: pgcluu [options] [-i sar_file | -I sadc_file] [input_dir]
files are stored.

options:

-b, --begin datetime start date/time for the data to be parsed.
-C, --cache generate cache files only (.bin), no html output.
-d, --db-only dbname only report for the whole cluster and the given
database name. You can use it multiple time or
give a comma separated list of database name.
-D, --device-only dev only report I/O stats for a particular device
You can use it multiple time or give a comma
separated list of device name, ex: sda,sdc.
-e, --end datetime end date/time for the data to be parsed.
-i, --sar-file=FILE path to the sar text data file to read to generate
system reports. Default to input_dir/sar_stats.dat.
-I, --sadc-file=FILE sadc binary data file to read to generate system
reports. Default to input_dir/sadc_stats.dat.
-n, --top-number Top number of tables or indexes I/O stats to show.
Default is set to top 10. Set it to 0 to show all.
-N, --network-only iface only report stats for a particular network interface.
You can use it multiple times or give a comma separated
list of network interfaces, ex: eth0,eth1.
-o, --output=DIR output directory
-r, --reverse-date By default pgcluu look at mm/dd/yy format in sar file.
When enabled pgcluu will look at dd/mm/yy format.
-s, --sadf=BIN path to the sadf sysstat command used to read the
sadc binary data file. Default: /usr/bin/sadf.
-S, --disable-sar disable collect of system statistics with sar.
-t, --with-table table Only report for the whole tables and the given
table name. You can use it multiple time or
give a comma separated list of database name.
-T, --no-table Do not report statistics related to tables.
-v, --verbose Print out debug informations.
-V, --version Show pgcluu version and exit.
-x, --external-menu Save menu in menu.html and load it into each report
using w3-include-html attribut from w3.js. This will
-b, --begin datetime start date/time for the data to be parsed (time of current timezone).
-C, --cache generate cache files only (.bin), no html output.
-d, --db-only dbname only report for the whole cluster and the given
database name. You can use it multiple time or
give a comma separated list of database name.
-D, --device-only dev only report I/O stats for a particular device
You can use it multiple time or give a comma
separated list of device name, ex: sda,sdc.
-e, --end datetime end date/time for the data to be parsed (time of current timezone).
-i, --sar-file=FILE path to the sar text data file to read to generate
system reports. Default to input_dir/sar_stats.dat.
-I, --sadc-file=FILE sadc binary data file to read to generate system
reports. Default to input_dir/sadc_stats.dat.
-n, --top-number Top number of tables or indexes I/O stats to show.
Default is set to top 10. Set it to 0 to show all.
-N, --network-only iface only report stats for a particular network interface.
You can use it multiple times or give a comma separated
list of network interfaces, ex: eth0,eth1.
-o, --output=DIR output directory
-r, --reverse-date By default pgcluu look at mm/dd/yy format in sar file.
When enabled pgcluu will look at dd/mm/yy format.
-s, --sadf=BIN path to the sadf sysstat command used to read the
sadc binary data file. Default: /usr/bin/sadf.
-S, --disable-sar disable collect of system statistics with sar.
-t, --with-table table Only report for the whole tables and the given
table name. You can use it multiple time or
give a comma separated list of database name.
-T, --no-table Do not report statistics related to tables.
-v, --verbose Print out debug informations.
-V, --version Show pgcluu version and exit.
-x, --external-menu Save menu in menu.html and load it into each report
using w3-include-html attribut from w3.js. This will
only work if acces to HTML reports is through a Web
server, not using the file:// protocol.
-z, --timezone +/-XX Set the number of hour(s) from GMT of the timezone.
Use this to adjust date/time from the sar output,
pgcluu use GMT time to draw charts.
-Z, --stats-timezone +/-XX Set the number of hour(s) from GMT of the timezone.
Use this to adjust date/time from the cluster and
system stats output, pgcluu use GMT time.
--from-sa-file instruct pgcluu that file specified by the -i option
uses the standard system activity daily data file.
--charset used to set the HTML charset to be used.
Default: utf-8.
--retention NDAYS number of rolling days to keep in report directory.
Default is to store indefinitely.
--help print usage
-z, --timezone +/-XX Set the number of hour(s) from GMT of the timezone,
Eg: -z +02
Usually autodetected.
Use this to adjust date/time from the sar output,
pgcluu use GMT time to draw charts.
-Z, --stats-timezone +/-XX Set the number of hour(s) from GMT of the timezone.
Eg: -Z +02
Usually autodetected.
Use this to adjust date/time from the cluster and
system stats output, pgcluu use GMT time.
--from-sa-file instruct pgcluu that file specified by the -i option
uses the standard system activity daily data file.
--charset used to set the HTML charset to be used.
Default: utf-8.
--retention NDAYS number of rolling days to keep in report directory.
Default is to store indefinitely.
--help print usage

For example, you can generate all HTML reports from data files stored into
/tmp/stat_db1/ with the following commands:
Expand Down

0 comments on commit 5a2cfaf

Please sign in to comment.