Fora.Rti.Admin User Manual¶
fora-admin is the headless remote administration CLI for Fora.Rti.Server. It connects to a running server over HTTP and executes one-off admin commands — suitable for automation, CI pipelines, and SSH sessions. It does not start an RTI itself.
Table of Contents¶
- Installation
- Quick Start
- Global Options
- Authentication
- Commands
- version
- health
- shutdown
- lsfed
- lsfr
- sessions
- save
- restore
- logs tail
- Output Formats
- Exit Codes
- Script Examples
- Disclaimer
Installation¶
As a .NET global tool¶
dotnet tool install --global Fora.Rti.Admin
After installation the fora-admin command is available on PATH.
From source¶
dotnet run --project src\Fora.Rti.Admin\Fora.Rti.Admin.csproj -- --connect <url> <command>
Quick Start¶
The server's admin API listens on http://localhost:7112 by default (Kestrel:Endpoints:Http:Url); the container image uses port 8080.
# Check server health
fora-admin --connect http://localhost:7112 health
# List active federations
fora-admin --connect http://localhost:7112 lsfed
# Same commands with JSON output
fora-admin --connect http://localhost:7112 --format json health
fora-admin --connect http://localhost:7112 --format json lsfed
Global Options¶
fora-admin --connect <url> [--format json|text] [--token <key>] <command> [arguments]
| Option | Description |
|---|---|
--connect <url> |
Base URL of the Fora.Rti.Server admin API (required for all commands, and must come first). Must be an absolute HTTP/HTTPS URL. |
--format json\|text |
Output format. text (default) writes human-readable lines; json writes machine-parseable JSON. |
--token <key> |
Admin API key, sent as an Authorization: Bearer <key> header. Required only when the server has an admin key configured. Falls back to the FORA_RTI_TOKEN environment variable; the argument wins when both are set. See Authentication. |
--help, -h |
Print usage and exit with code 0. |
Command names are case-insensitive. lsfed is also available as listfederations, lsfr as listjoinedfederates.
Authentication¶
By default the admin HTTP surface is unauthenticated. When the server sets ForaRtiServer:Admin:ApiKey, every /admin/* command requires a matching key; version and health stay open (they map to /version and /health, which are never gated).
Supply the key one of two ways — the argument takes precedence when both are present:
# Explicit flag
fora-admin --connect https://rti-host:8443 --token "$ADMIN_KEY" shutdown
# Environment variable (keeps the secret out of the process argument list — preferred for scripts and CI)
export FORA_RTI_TOKEN="s3cr3t-admin-key"
fora-admin --connect https://rti-host:8443 shutdown
A missing or wrong key returns HTTP 401; the CLI writes Admin authentication failed (401 Unauthorized). Supply a valid --token or FORA_RTI_TOKEN. to stderr and exits with code 1.
The Bearer token is transmitted in clear text over plain HTTP. Use an
https://endpoint (or a trusted network boundary) whenever an admin API key is configured.
Commands¶
version¶
Displays the server component, package version, HLA standard, and capability level.
fora-admin --connect http://localhost:7112 version
Text output:
Fora.Rti v20261004.0.0
Standard : IEEE 1516-2025
HLA : HLA 4
Capability: Phase7
JSON output (--format json):
{
"component": "Fora.Rti",
"packageVersion": "20261004.0.0",
"standard": "IEEE 1516-2025",
"hla": "HLA 4",
"capabilityLevel": "Phase7"
}
health¶
Checks whether the server's Federate Protocol listener is running. Exits with 1 when the server is unhealthy, so a script can gate on it.
fora-admin --connect http://localhost:7112 health
Text output:
Server: Healthy - FP listener is running.
Active sessions: 2
HLA authorization: Disabled (none)
An unhealthy server prints Server: Unhealthy - FP listener is not running. to stderr.
JSON output:
{
"healthy": true,
"activeSessions": 2,
"authorizationEnabled": false,
"authorizationServiceName": "none"
}
shutdown¶
Requests a graceful server shutdown via POST /admin/shutdown.
fora-admin --connect http://localhost:7112 shutdown
Text output: Shutdown initiated...
JSON output:
{
"requested": true
}
lsfed¶
Lists the names of all active federation executions. Alias: listfederations.
fora-admin --connect http://localhost:7112 lsfed
Text output: Active Federations (2): SpacecraftSimulation, GroundStation (none when there are none).
JSON output:
[
"SpacecraftSimulation",
"GroundStation"
]
lsfr¶
Lists all joined federates with their name, federate type, and federation name. Alias: listjoinedfederates.
fora-admin --connect http://localhost:7112 lsfr
Text output:
Joined Federates (2)
- Sensor1 (SensorType) @ SpacecraftSimulation
- Control (ControlType) @ SpacecraftSimulation
JSON output:
[
{ "name": "Sensor1", "type": "SensorType", "federation": "SpacecraftSimulation" },
{ "name": "Control", "type": "ControlType", "federation": "SpacecraftSimulation" }
]
sessions¶
Lists all Federate Protocol sessions with their last-seen time and whether they are online.
fora-admin --connect http://localhost:7112 sessions
Text output:
FP Sessions (1)
- 3f2c9a1e… last=10:30:00 online
JSON output:
[
{
"sessionId": "3f2c9a1e…",
"connectionId": "c-abc",
"lastSeenUtc": "2026-10-04T10:30:00+00:00",
"disconnectedAtUtc": null,
"isOnline": true
}
]
save¶
Saves a full RTI state snapshot to the configured ISnapshotStore under the given label. This bypasses the HLA save/restore state machine and can be invoked at any time.
fora-admin --connect http://localhost:7112 save baseline
Text output: Snapshot 'baseline' saved.
JSON output:
{
"label": "baseline",
"saved": true
}
Without a label the command prints Usage: save <label> to stderr and exits with 1.
restore¶
Restores RTI state from a previously saved snapshot.
fora-admin --connect http://localhost:7112 restore baseline
Text output: Snapshot 'baseline' restored.
JSON output:
{
"label": "baseline",
"restored": true
}
Label not found: Snapshot 'baseline' not found. on stderr, exit code 1 (in JSON mode the result object shows "restored": false).
logs tail¶
Fetches the current log backlog and then streams new log entries until interrupted (Ctrl+C).
fora-admin --connect http://localhost:7112 logs tail
Text output:
2026-10-04T10:00:00.0000000+00:00 [Success] Federation 'SpacecraftSimulation' created.
2026-10-04T10:00:01.0000000+00:00 [Success] Federate 'Sensor1' joined.
JSON output (NDJSON — one JSON object per line):
{"TimestampUtc":"2026-10-04T10:00:00+00:00","Level":"Success","Message":"Federation 'SpacecraftSimulation' created."}
logs tailruns indefinitely. UseCtrl+Cor a process timeout to stop it.
Output Formats¶
| Format | Flag | Use case |
|---|---|---|
text (default) |
--format text or omit |
Human-readable terminal output. |
json |
--format json |
Machine-parseable output for scripts, CI, and log aggregators. List commands produce a JSON array, the others a JSON object (indented, camelCase); logs tail produces NDJSON, one object per line. |
Error messages (an unhealthy server, a snapshot not found, a connection failure) are always written to stderr as plain text regardless of --format, so stdout stays parseable.
Exit Codes¶
| Code | Meaning |
|---|---|
0 |
Command succeeded. |
1 |
Command failed: invalid arguments, unknown command, a missing label, a snapshot not found, an unhealthy server (health), a connection error, or an authentication failure. |
Script Examples¶
CI health gate¶
fora-admin --connect http://localhost:7112 health || { echo "RTI not healthy"; exit 1; }
Save snapshot before test run¶
fora-admin --connect http://rti-host:7112 save pre-test
Authenticated command against a secured server¶
export FORA_RTI_TOKEN="s3cr3t-admin-key"
fora-admin --connect https://rti-host:8443 save pre-test
Parse federation list in a shell script¶
fora-admin --connect http://localhost:7112 --format json lsfed | jq '.[]'
Log collection with timeout¶
timeout 60 fora-admin --connect http://localhost:7112 --format json logs tail \
>> /var/log/fora-rti.ndjson
PowerShell — check federation count¶
$feds = fora-admin --connect http://localhost:7112 --format json lsfed | ConvertFrom-Json
Write-Host "Active federations: $($feds.Count)"
Disclaimer¶
Fora is provided as a research and educational environment. Review the project license and release notes before using it in production-like workflows.
See the Disclaimer for usage terms and research-only conditions.
Updated November 18, 2026, 21:47:16 (UTC+03:00)