joeshaw / pgactivity

A tool to print out pg_stat_activity on an interval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 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.

About

A tool to print out pg_stat_activity on an interval

License:MIT License


Languages

Language:Go 100.0%