don't background the editor if we are not under X
[sgn-devtools.git] / pg_connection_count.sh
blob78858dad74d633b4749d86eb5926a611b70a672c
1 #!/bin/bash
2 while [ 1 ]; do
3 sudo -u postgres psql -c "select datname,count(*) as connections from pg_stat_activity where usename <> 'postgres' group by datname"
4 sleep 1;
5 clear;
6 done