Skip to main content

Get-ZrPartitionRuntime

Shows the live partition runtime state — active node, replica set, runtime state, and generation — per node. Run it to watch failover and resync progress, or to confirm a partition has settled onto its expected active node.

Syntax

Get-ZrPartitionRuntime
-StoreName <string>
[-NodeId <string>]
[-TimeoutMs <int>]
[-Continuous] [-IntervalSeconds <int>]
[-ShowEpoch]
[-AsJson]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]

Description

Get-ZrPartitionRuntime collects the partition-runtime snapshot from every node of the named store and renders, per partition, the active node, replica set, runtime state, and the map-carried generation. Transitional states (sync, recover, restore, dwell) are annotated onto the replica entries so you can see which replicas are catching up. With -Continuous the table re-renders on an interval until Ctrl-C, making it a live monitor.

The output is a rendered console table; use -AsJson to emit the raw typed result as indented JSON (this emits once even with -Continuous). The cmdlet requires an active workspace (see New-ZrWorkspace / Use-ZrWorkspace) or an explicit -Managers list.

Parameters

ParameterTypeRequiredDescription
-StoreNamestringYesName of the store whose partition runtime to collect.
-NodeIdstringNoRestricts collection to a single node id; when omitted every node in the store is queried.
-TimeoutMsintNoPer-node collection timeout in milliseconds; when omitted the server default is used.
-ContinuousswitchNoRe-renders the table on an interval until Ctrl-C instead of collecting once.
-IntervalSecondsintNoRefresh interval in seconds when -Continuous is set. Default 120.
-ShowEpochswitchNoAdds the legacy per-node runtime Epoch column, otherwise hidden in favor of the map-carried generation.
-AsJsonswitchNoEmits the raw typed diagnostics result as indented JSON instead of the formatted table.
-Managersstring[]NoManagement Service endpoints to target; when omitted the active workspace's managers are used.
-PortintNoManagement Service port for bare-host managers. Default 7801.
-TokenstringNoAdmin bearer token for authenticated control-plane calls.
-TimeoutSecintNoPer-request timeout in seconds. Default 30.

Examples

Show the current live partition runtime state of the orders store.

Get-ZrPartitionRuntime -StoreName orders

Continuously refresh the runtime state every five seconds until Ctrl-C.

Get-ZrPartitionRuntime -StoreName orders -Continuous -IntervalSeconds 5

Reading the output

Each row is a partition as reported by the node in the Node column (green on success, red with an (*N) footnote marker on error):

  • MapVer — the topology version the node has applied.
  • Partition — the stable partition name, with the segment range appended as (Seg <first>-<last>) when present.
  • Active — the node currently serving the partition.
  • Replicas — the replica nodes (the active node is not listed as its own replica). During a transition, entries are annotated with the runtime state, e.g. 10.0.0.12-n0 (syncing).
  • RuntimeState — the partition's live state; sync/recover/restore/dwell values indicate a partition still stabilizing.
  • Gen — the map-carried generation, which is monotonic across restarts (unlike the legacy Epoch shown with -ShowEpoch).