11 lines
729 B
Bash
11 lines
729 B
Bash
#!/usr/bin/env bash
|
||||
|
|
export PGPASSWORD=dshs_cluster_2026
|
|||
|
|
Q() { /usr/bin/psql -h 127.0.0.1 -p 15432 -U dshs -d dshs -tAc "$1"; }
|
|||
|
|
echo "=== users ==="
|
|||
|
|
Q "select id || ' | ' || username || ' | ' || role || ' | uid=' || coalesce(uid::text,'-') from users order by row_id"
|
|||
|
|
echo "=== dsh_instances ==="
|
|||
|
|
Q "select id || ' | user=' || user_id || ' | ' || role || ' | ' || status || ' | host=' || coalesce(host_id,'NULL') || ' | epoch=' || epoch from dsh_instances order by id"
|
|||
|
|
echo "=== dsh_hosts ==="
|
|||
|
|
Q "select id || ' | cap=' || capacity_mb || ' | used=' || used_mb || ' | ' || status from dsh_hosts order by id"
|
|||
|
|
echo "=== sessions(应为 0 条 switch-verify) ==="
|
|||
|
|
Q "select count(*) from sessions where user_agent='switch-verify'"
|