https://github.com/joeshaw/pgactivity
A tool to print out pg_stat_activity on an interval
https://github.com/joeshaw/pgactivity
golang postgresql
Last synced: 2 months ago
JSON representation
A tool to print out pg_stat_activity on an interval
- Host: GitHub
- URL: https://github.com/joeshaw/pgactivity
- Owner: joeshaw
- License: mit
- Created: 2015-11-04T16:34:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-04T16:34:51.000Z (over 10 years ago)
- Last Synced: 2025-06-06T02:03:35.925Z (about 1 year ago)
- Topics: golang, postgresql
- Language: Go
- Homepage:
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`pgactivity` is a simple Go program that prints activity within a
Postgres database. It queries the `pg_stat_activity` view on an
interval (defaulting to every second).
Usage is simple:
$ pgactivity
Configure it by setting `libpq` environment variables. [See the
documentation](http://www.postgresql.org/docs/9.4/static/libpq-envars.html)
for all possible values. Typically you'll want to set `PGHOST`,
`PGUSER` and `PGPASSWORD`:
$ PGHOST=mydatabase.example.com PGUSER=dbuser PGPASSWORD=wolf pgactivity
A timestamp is printed before each result set is printed.