Watch-DkvStoreMetrics
Synopsisβ
Displays live runtime metrics for a Clustron Distributed Key-Value (DKV) store in a continuously updating console view.
Description
Watch-DkvStoreMetrics provides a realβtime monitoring view of store metrics across cluster nodes.
The cmdlet periodically queries the Clustron manager API and renders a metrics table in the PowerShell console. The display updates continuously at a configurable refresh interval.
Metrics are grouped by:
- Category
- Metric name
- Cluster node
Each metric cell displays:
Rate/sec (Total)
Example:
2,341/s (134,223)
Where:
Rate/secis the average rate calculated over the recent sampling windowTotalis the cumulative metric value
The view automatically refreshes in place until the command is cancelled (Ctrl+C).
Internally the cmdlet queries the manager metrics endpoint:
GET /admin/v1/metrics?windowSec=5
Syntax
Watch-DkvStoreMetrics -StoreName <string> [-RefreshSec <int>] [-Managers <string[]>]
Optional parameters inherited from DkvCmdletBase:
[-Port <int>] [-TimeoutSec <int>]
Parameters
-StoreNameβ
Name of the store whose metrics should be monitored.
Example:
OrdersStore
Required: Yes
-RefreshSecβ
Refresh interval in seconds for updating the metrics display.
Valid range:
1 β 60 seconds
Default:
1 second
Example:
-RefreshSec 2
-Managersβ
Target Clustron manager services.
Example:
-Managers 10.0.0.11,10.0.0.12
If omitted, the cmdlet uses the active Connect-DkvManager session.
-Portβ
Manager API port used when resolving managers.
Default:
7801
-TimeoutSecβ
Maximum time allowed for a metrics request.
Default:
30 seconds
Examples
Example 1 β Monitor store metricsβ
Watch-DkvStoreMetrics -StoreName OrdersStore
The console updates continuously with live metrics.
Example 2 β Monitor metrics with slower refreshβ
Watch-DkvStoreMetrics -StoreName OrdersStore -RefreshSec 3
Updates every 3 seconds.
Example 3 β Monitor metrics from specific manager servicesβ
Watch-DkvStoreMetrics `
-StoreName OrdersStore `
-Managers 10.0.0.11,10.0.0.12
Example 4 β Monitor metrics using a connected manager sessionβ
Connect-DkvManager -Managers 10.0.0.11,10.0.0.12
Watch-DkvStoreMetrics -StoreName OrdersStore
Example Output
Store: OrdersStore Updated: 15:32:11
Category Metric 10.0.0.11/nodeA 10.0.0.12/nodeBβ
DKV Get 2,100/s (154,002) 1,980/s (149,210) DKV Put 980/s (74,221) 1,020/s (76,002) DKV Remove 210/s (12,341) 198/s (11,900) DKV Count - (2,340,122) - (2,345,001)
Metric Display Format
Metrics are shown in the format:
Rate/sec (Total)
Example:
2,341/s (134,223)
Value Meaning
Rate/sec Average operations per second Total Total cumulative value
If a rate cannot be calculated, the display shows:
- (Total)
Behavior
Continuous Displayβ
The console is cleared and redrawn on each refresh cycle so the table updates in place.
Cancellationβ
Press Ctrl+C to stop the monitoring session.
Metrics Filteringβ
Only metrics belonging to the specified StoreName are displayed.
Node Identificationβ
Nodes appear in the format:
managerHost/shortNodeId
Example:
10.0.0.11/5f7c1a92
Notes
Manager Connection Requirementβ
If neither -Managers nor an active Connect-DkvManager session exists, the cmdlet terminates with an error:
No managers connected. Use Connect-DkvManager or specify -Managers.
Recommended Usageβ
This cmdlet is typically used during:
- Performance testing
- Capacity planning
- Production diagnostics
- Cluster troubleshooting
Related Cmdlets
- Connect-DkvManager
- Get-DkvStore
- New-DkvStore
- Add-DkvInstance
- Start-DkvStore
- Stop-DkvStore