postgres pgCluee - ghdrako/doc_snipets GitHub Wiki
pgCluu monitors an entire cluster for performance metrics, such as the utilization of CPU, memory, swap, system load, number of processes, block IO, changes in the size of individual databases, database connections, temporary files, and many other measurements. It can be downloaded from here: https://github.com/darold/pgcluu. It comes in two parts:
- the collector process (pgcluu_collectd) and
- the report-generating tool (pgcluu).
Typical usage would be:
mkdir /tmp/stat_db/
pgcluu_collectd -D -i 60 /tmp/stat_db/ -h localhost -d postgres
This would start collecting data every 60 seconds. Collection would stop with:
pgcluu_collectd -k
You’d then generate the report:
mkdir /tmp/report_db/
pgcluu -o /tmp/report_db/ /tmp/stat_db/
That directory will then contain an HTML report that can be opened in the browser. All files in that directory will be needed.