# server: instance summary, parameters and license

> Inspect full KES version/mode, changed and pending_restart parameters, and license expiry, MAC, and max connections.

---

LLMS index: [llms.txt](/kbdiag-docs/llms.txt)

---

Covers instance summary (`server`), non-default / `pending_restart` settings (`server params`), and license validity/binding (`server license`). Read-only: never modifies parameters, reloads configs, or restarts the instance.

## Usage

```bash
kbdiag server
kbdiag server params
kbdiag server license
kbdiag server --json
```

## Subcommands & Options

| Command / Option | Effect |
|---|---|
| `server` | Instance identity, connections summary, license summary, and non-default parameter preview |
| `server params` | Full non-default and `pending_restart` parameter list with source files and line numbers |
| `server license` | License expiry countdown, path, bound MAC, and license connection limit |
| `--json` | Emit structured JSON (`inst.identity`, `inst.info`, `params.changed`, `license.info`) |

## Verdict & Reading Output

- **`FAIL` (`exit=2`)**: `license.expired` (instance keeps running, next restart fails; check primary and standby separately) or `inst.connections` (ordinary-user connection headroom exhausted on `kbdiag server`).
- **`WARN` (`exit=1`)**: `license.expiring` (within 30 days) or `params.pending_restart` (changed parameter waiting for restart; suggested rollback SQL is printed safely for manual review).
- **`UNKNOWN` (`exit=3`)**: Probe failure or missing `sys_read_all_settings` / superuser privilege (even when visible file-backed rows are empty).
- **Privacy note**: `license.dat` path and `mac` print verbatim (`not redacted`); scrub before external sharing.

## Examples (KES V9 Primary, excerpt, `COLUMNS=80`)

```text
inst.summary  OK  (KingbaseES V009R002C016, primary, system@local,
    endpoint=/tmp/.s.KINGBASE.54321, 2026-12-03T09:40:35Z)
[INST.IDENTITY]
  ok, 1 rows
  full_version=KingbaseES V009R002C016 | server_version_num=120001 |
    database_mode=oracle | role=primary
[INST.INFO]
  ok, 1 rows
  version=V009R002C016 | connections=2 | max_connections=100 |
    usable_connections=97
...
```

```text
params  OK  (KingbaseES V009R002C016, primary, system@local,
    endpoint=/tmp/.s.KINGBASE.54321, 2026-12-03T04:05:00Z)
[PENDING RESTART]
  0
[CHANGED]
  45 parameters not at their default (sources other than default, override and
    this connection)
  ...
  archive_command = exit 0
    source=configuration file  file=kingbase.conf:236
  archive_mode = always
    source=configuration file  file=kingbase.conf:234
```

```text
[LICENSE]
  left             171 days
  file             /data/kingbase/app/KESRealPro/V009R002C016/Server/bin/../../l
    icense.dat
  product          KingbaseES
  version          V009
  validity         180
  mac              00:00:00:00:00:00
  max connections  0
  KES checks the license only when the instance starts
  note: file path and MAC shown verbatim (not redacted); scrub before sharing
```

## Related Commands

- [`kbdiag check`](/kbdiag-docs/docs/reference/check/) — run nine-domain patrol including connections and license
- [`kbdiag session`](/kbdiag-docs/docs/reference/session/) — inspect active backends against `max_connections`
- [`kbdiag status`](/kbdiag-docs/docs/reference/status/) — check instance uptime, primary/standby role, and hosts
