{
  "slug": "postgres-show-active-connections",
  "title": "Show Active PostgreSQL Connections",
  "fixture": "containers/db-first-response-lab",
  "command_count": 3,
  "container_tool": "docker",
  "image": "localhost/linuxoneliners-lab:latest",
  "exit_code": 0,
  "elapsed_ms": 204,
  "stdout": "::fixture-ready::\n$ psql -X -c \"select count(*) from pg_stat_activity;\"\n count\n-------\n     5\n(1 row)\n::exit-code::0\n$ psql -X -A -F '|' -c \"select pid,usename,datname,state,client_addr from pg_stat_activity order by state, pid;\"\npid|usename|datname|state|client_addr\n511|app|app_prod|active|10.0.0.12\n512|app|app_prod|idle|10.0.0.13\n518|migrator|app_prod|active|10.0.0.20\n::exit-code::0\n$ psql -X -c \"select state, count(*) from pg_stat_activity group by state order by state;\"\n state  | count\n--------+-------\n active |     2\n idle   |     2\n(2 rows)\n::exit-code::0\n",
  "stderr": "",
  "ok": true,
  "security": {
    "network": "none",
    "capabilities": "dropped",
    "no_new_privileges": true,
    "memory": "256m",
    "cpus": "1",
    "pids_limit": 128,
    "tmpfs": [
      "/tmp",
      "/var"
    ]
  }
}