pg_top

Monitor PostgreSQL server processes and query activity in real-time

brewmacoslinux
Try with needOr install directly
Source

About

Monitor PostgreSQL processes

Commands

pg_top

Examples

Connect to local PostgreSQL database and display process activity$ pg_top
Connect to specific PostgreSQL host and monitor processes$ pg_top -h localhost -U postgres -d mydbname
Monitor with custom refresh interval (2 seconds) and batch mode output$ pg_top -s 2 -b