A top-like command-line tool for real-time monitoring of PostgreSQL server activity.
pg_activity is a command-line tool that provides a top-like interface for monitoring PostgreSQL server activity in real time. It displays running queries, resource usage (CPU, memory, I/O), locks, and other critical metrics, helping administrators diagnose performance issues and manage database workloads.
PostgreSQL database administrators, DevOps engineers, and developers who need to monitor and troubleshoot database performance from the terminal.
It offers a lightweight, interactive, and feature-rich alternative to built-in PostgreSQL views, with customizable displays, keyboard-driven navigation, and support for both local and remote instances.
pg_activity is a top like application for PostgreSQL server activity monitoring.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides dynamic, continuously updated views of PostgreSQL processes with configurable refresh rates from 0.5 to 5 seconds, mimicking Unix top for immediate insight.
Supports configuration files, profiles (like narrow or wide), and command-line options to show/hide columns, apply colors, and tailor displays to specific admin needs.
Connects to both local and remote PostgreSQL servers using libpq with various authentication methods, including password files and environment variables for secure access.
Includes keyboard shortcuts for sorting, filtering by database or duration, and interactive commands to copy queries (with 'y') or terminate backends directly from the interface.
To access full system information and temporary file data, the PostgreSQL user must be a super-user, which can introduce security risks in production environments.
Relies on PostgreSQL's track_activity_query_size parameter; queries may be truncated if this value is low, and increasing it requires server-side configuration changes.
Purely real-time with no built-in storage or visualization of historical trends, making it inadequate for long-term performance analysis without external tools.
Features like copying queries via OSC 52 escape sequences depend on terminal emulator support, which may not be available in all environments, limiting functionality.