About kbdiag
Purpose
kbdiag translates KingbaseES system evidence into a verdict, supporting facts and the next diagnostic command. It serves DBAs, operations teams and automation scripts handling sessions, locks, transaction horizons, workload, storage and replication.
Runtime and requirements
One static Linux amd64/arm64 binary speaks the database protocol directly; the database host needs no ksql, Go runtime or agent service. Supported families are KES V8R6 + V9 (V008R006* and V009R002* verified). SQL variants follow detected views, columns, database mode and XID width rather than a guessed version number. repmgr is optional and isolated in cluster.
Operating boundaries
Diagnostic connections run read-only with a 500ms lock timeout, bounded execution budget and cancellation. kbdiag never alters data, terminates sessions or runs online EXPLAIN ANALYZE. Bounded --exact object-size lookups can request relation locks; review the object reference before opting in.
point, counter, delta and estimate describe different evidence semantics. Missing or masked evidence is always shown explicitly; a visible FAIL never hides incomplete coverage. Each command captures a snapshot rather than running continuous monitoring. check --html exports a zero-JS, CSP-restricted static file (0600) with SQL redacted by default.
Reference and next step
Use the command reference to check required privileges, standby behavior, and verdict rules before automation or incident response.