pg_activity: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/pg_activity - from package: pg-activity

You may install the required package with command apt-get install {package}
Error in other languages:
pg_activity: bevel nie gevind nie
pg_activity: comandă negăsită
pg_activity: comando não encontrado
pg_activity: commande introuvable
pg_activity: command not found
pg_activity: käsku ei ole
pg_activity: không tìm thấy lệnh
pg_activity: komanda nerasta
pg_activity: Kommando nicht gefunden.
pg_activity: kommandot finns inte
pg_activity: komut yok
pg_activity: nie znaleziono polecenia
pg_activity: níor aimsíodh an t-ordú
pg_activity: no se encontró la orden
pg_activity: no s'ha trobat l'ordre
pg_activity: opdracht niet gevonden
pg_activity: parancs nem található
pg_activity: perintah tidak ditemukan
pg_activity: príkaz nenájdený
pg_activity: příkaz nenalezen
pg_activity: команда не найдена
pg_activity: командата не е открита
pg_activity: 命令找不到
pg_activity: コマンドが見つかりません