Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
OnGres Inc.
pgio
Commits
d6ff6299
Commit
d6ff6299
authored
Dec 19, 2018
by
Matteo Melli
Browse files
Merge branch 'improve-readme' into 'master'
Improved README See merge request ongresinc/pgio!3
parents
2da6b52d
980cac5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d6ff6299
# pgio
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
stored and interpreted (using CSV by default but supporting Prometheus) to
analyze and find out which part of postgresql is using the disk most during a
usage stats per process (that can be grouped by process type) and total of the system.
The tool produce a stream of data that can be
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.
## Stats collected
...
...
@@ -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
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
```
\ No newline at end of file
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment