Commit d6ff6299 authored by Matteo Melli's avatar Matteo Melli

Merge branch 'improve-readme' into 'master'

Improved README

See merge request ongresinc/pgio!3
parents 2da6b52d 980cac5e
# pgio # pgio
A Java CLI turned in executable using GraalVM that is able to capture disk IO A Java CLI turned in executable using GraalVM that is able to capture disk IO
usage stats per process and to turn this info into a stream of data that can be usage stats per process (that can be grouped by process type) and total of the system.
stored and interpreted (using CSV by default but supporting Prometheus) to The tool produce a stream of data that can be
analyze and find out which part of postgresql is using the disk most during a stored and interpreted (using CSV by default or exporting to Prometheus) to
analyze and find out which part of PostgreSQL is using the disk most during a
period of time. period of time.
## Stats collected ## Stats collected
...@@ -146,10 +147,45 @@ pattern from [java.util.regex.Pattern](https://docs.oracle.com/javase/8/docs/api ...@@ -146,10 +147,45 @@ pattern from [java.util.regex.Pattern](https://docs.oracle.com/javase/8/docs/api
} }
``` ```
For example to use with PostgreSQL we create a template using following `postgresql.json`:
```
{
"archiver": [ ".*archiver.*" ],
"wal sender": [ ".*wal sender.*" ],
"bgwriter": [ ".*writer process.*" ],
"autovacuum": [ ".*autovacuum worker process.*" ],
"stats": [ ".*stats collector process.*" ],
"wal writer": [ ".*wal writer process.*" ],
"checkpoint": [ ".*checkpointer process.*" ],
"query": [ "postgres: " ],
}
```
```
bin/pgio -D <postgresql data dir> --advanced --group postgresql.json
```
The expected output will include following groups:
* archiver
* wal sender
* bgwriter
* autovacuum
* stats
* wal writer
* checkpoint
* query
The idea is that you can extend those groups to include other relevant
tools like wal-e, pgbouncer, particual user's queries.
Grouping stats by process type reduce the number of stats collected
and provide more understandable metrics.
## Prometheus service ## Prometheus service
To start pgio as a prometheus service: To start pgio as a prometheus service:
``` ```
bin/pgio -D <postgresql data dir> --advanced --prometheus-service --prometheus-bind 0.0.0.0 --prometheus-port 9090 bin/pgio -D <postgresql data dir> --advanced --prometheus-service --prometheus-bind 0.0.0.0 --prometheus-port 9090
``` ```
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment