# dalibo/pg_activity

pg_activity is a top like application for PostgreSQL server activity monitoring.

Repository: https://github.com/dalibo/pg_activity
Canonical: https://ross.abutalabs.com/products/pg_activity
Language: Python
License: PostgreSQL
License Family: other
Topics: postgresql, activity, monitoring, cli, sql, top
Last push: 2026-08-01T06:03:15+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 55, longevity 100
- inputs: {"age_days": 5057, "days_push": 32, "days_rel": 89, "gap_med": 234.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3034, forks 190 (observed 2026-08-28T04:07:39.055781+00:00)

## What it is
pg_activity is a top-like command line tool for monitoring PostgreSQL server activity in real time. It displays running queries, waits, CPU, memory, and I/O usage, working locally or remotely.

## Use cases
- monitor postgres server activity from the terminal
- see which queries are running on postgresql right now
- watch cpu and io usage of my postgres database
- find long-running or blocking queries in postgres
- top-like tool for postgres
- debug slow queries on a postgres server

## When to choose
- you want a lightweight, htop-style live view of PostgreSQL activity without a web dashboard
- you need quick ad-hoc inspection of running queries, waits, and system resource usage
- you prefer a CLI tool installable via pip, pipx, or distro packages

## When to avoid
- you need long-term metrics storage, dashboards, or alerting (use Prometheus/pgwatch instead)
- you need monitoring of many servers from one place
- you cannot connect as a superuser or the postgres OS user and need full system-level stats

## Facets
- artifact type: cli-tool
- maturity: active
- function: monitoring, database, cli
- domain: databases, monitoring, developer-tools
- platform: python, cli
- tags: postgresql, top-like, database-monitoring, terminal-ui, sql, command-line, linux, macos

## Member repositories
- dalibo/pg_activity (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:39.055781+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:29:46.127498+00:00, confidence not recorded.
  - readme: https://github.com/dalibo/pg_activity (fetched 2026-08-28T04:07:39.055781+00:00, sha 1aa68b2f8858)
  - registry_pypi: https://pypi.org/pypi/pg_activity/json (fetched 2026-08-29T09:44:30.964197+00:00, sha a90b42de2fd1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
