Skip to content

status: instance overview and local health

Check instance version, role, replication, activity, license, connections and local disk.

First command to run on an instance: one screen showing role, connection headroom, active/waiting sessions, license validity, replication lag and local data-directory disk usage. Read-only: never modifies sessions, settings or data.

Usage

kbdiag status                                   # local Unix socket (with disk)
kbdiag -h 10.10.10.22 -p 54321 -U system status # remote TCP connection
kbdiag status --json                            # JSON output

Key Options

OptionEffect
-h <host>Target host IP/DNS or Unix socket directory (default /tmp); TCP skips local disk checks with [COVERAGE]
-p <port>, -d <db>, -U <user>Target port (default 54321), database (test), and user (system)
--jsonEmit structured JSON (inst.info, inst.downstreams, inst.upstream, inst.databases, inst.disk)

Verdict & Reading Output

  • FAIL (exit=2): Ordinary-user connections exhausted, data filesystem >= 95% used (statfs over local Unix socket), or expired license.
  • WARN (exit=1): Data filesystem >= 90%, license <= 30 days remaining, or standby WAL receiver missing/disconnected/replay paused.
  • UNKNOWN (exit=3): Required probes failed or masked—non-monitoring users who cannot read other sessions see [REDACTED] instead of false 0 activity; remote TCP runs skip local disk cleanly.
  • Standbys: [REPLICATION] shows upstream host/slot, WAL replay state (active/paused), and byte lag.

Example (KES V9 Primary, COLUMNS=80)

status  OK  (KingbaseES V009R002C016, primary, oracle, system@local,
    endpoint=/tmp/.s.KINGBASE.54321, 2026-12-02T08:27:16Z)
[INSTANCE]
  uptime       2d 23h  (since 2026-11-29 09:11:19)
  data_dir     /data/kingbase/data  (port 54321)
  connections  2 / 97  (max 100, reserved 3)
  activity     0 active, 0 waiting, 0 idle-in-txn
  license      172d remaining
[REPLICATION]
  downstreams  1
  name   address      state      sync   replay_lag
  node2  10.10.10.22  streaming  async  0 bytes
[STORAGE]
  databases    5, total 26 GB  (largest: oneta_demo 26 GB)
  data_disk    31 GB / 128 GB used (24%), 97 GB free