Exits 0 when the server accepts connections and nonzero otherwise, so it fits monitoring scripts and load balancer checks. Use -U to also verify a specific role, or -d to check database reachability.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.