Created
April 16, 2014 23:37
-
-
Save rhettc/10942523 to your computer and use it in GitHub Desktop.
Show open connections to databases in a brief format conducive to CLI usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT procpid as pid, | |
usename as user, | |
datname as db, | |
application_name as app, waiting as wait, current_query as query | |
FROM pg_stat_activity | |
WHERE datname <> 'postgres'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment