Installation

_$: apt-get install ptop   # Alternatively: apt-get install pgtop

Run

_$: pg_top -U <user> -d <database>