postgress

SELECT count(*) FROM pg_stat_activity;

 

SELECT usesysid, usename,state FROM pg_stat_activity;