Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noborus/pgsp
PostgreSQL Stat Progress (pg_stat_progress) CLI Monitor
https://github.com/noborus/pgsp
bubbletea go pg-stat-progress postgresql
Last synced: 16 days ago
JSON representation
PostgreSQL Stat Progress (pg_stat_progress) CLI Monitor
- Host: GitHub
- URL: https://github.com/noborus/pgsp
- Owner: noborus
- License: mit
- Created: 2021-07-01T04:41:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-30T01:38:53.000Z (over 1 year ago)
- Last Synced: 2024-10-04T16:58:31.659Z (about 1 month ago)
- Topics: bubbletea, go, pg-stat-progress, postgresql
- Language: Go
- Homepage:
- Size: 349 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pgsp - PostgreSQL Stat Progress CLI Monitor
[![Go Reference](https://pkg.go.dev/badge/github.com/noborus/pgsp.svg)](https://pkg.go.dev/github.com/noborus/pgsp)
A CUI tool that monitors PostgreSQL's pg_stat_progress*.
Supported progress reports are ANALYZE, CLUSTER, CREATE INDEX, VACUUM, COPY, and BASE_BACKUP.
See [Progress Reporting](https://www.postgresql.org/docs/current/progress-reporting.html) for more information.![pgsp.png](https://raw.githubusercontent.com/noborus/pgsp/master/docs/pgsp.png)
## Requires
go 1.18 or later
## Install
### Download binary
[releases page](https://github.com/noborus/pgsp/releases/).
### Go install
```console
go install github.com/noborus/pgsp/cmd/pgsp@latest
```## Usage
Shows a progress bar if pg_stat_progress* is updated while waiting while running.
```console
$ pgsp --dsn 'host=/var/run/postgresql port=5432'
Using config file: /home/noborus/.pgsp.yaml
quit: q, ctrl+c, esc
pg_stat_progress_basebackup
pid | 402006
phase | streaming database files
backup_total | 10976660480
backup_streamed | 6093522944
tablespaces_total | 1
tablespaces_streamed | 0█████████████████████████░░░░░░░░░░░░░░░░░░ 56%
```It is also possible to specify one of the `analyze`, `basebackup`, `cluster`, `createindex`, `vacuums`, `copy` for monitoring.
```console
pgsp basebackup
``````console
Monitors PostgreSQL's pg_stat_progress_*.Usage:
pgsp [flags]
pgsp [command]Available Commands:
analyze analyze
basebackup basebackup
cluster cluster
copy copy
createindex createindex
help Help about any command
vacuum vacuumFlags:
-a, --AfterCompletion int Time to display after completion(Seconds) (default 10)
-i, --Interval float Update interval(Seconds) (default 0.5)
--config string config file (default is $HOME/.pgsp.yaml)
--dsn string PostgreSQL data source name
-f, --fullscreen Display in Full Screen
-h, --help help for pgsp
-t, --toggle Help message for toggle
-v, --version display version informationUse "pgsp [command] --help" for more information about a command.
```