Run the agent
Check the agent, run it as a service and reconnect clients after a restart.
Arguments
Use these command-line options:
| Argument | Effect |
|---|---|
--config <path> | Reads the configuration from <path>. Always pass it. |
--canary | Checks startup and region connectivity, prints the release number and exits |
Check with --canary
sudo -u swqos /opt/swqos/swqos --config /etc/swqos/swqos.toml --canaryThe check loads your configuration and license, then checks that a region answers. On success it exits with status 0 and prints:
canary passed: release <number>If no region answers in time, it exits with status 1. See Troubleshooting.
The check opens no local listener, so you can run it while the service is running.
Run in the foreground
The agent does not create the directory of its IPC socket. For a run in a terminal, create it first:
sudo install -d -o swqos -g swqos -m 0750 /run/swqos
sudo -u swqos /opt/swqos/swqos --config /etc/swqos/swqos.tomlThe agent writes logs to standard output. Wait for the listeners to open before connecting a local client. Stop it with Ctrl-C.
Run as a systemd service
[Unit]
Description=SWQoS agent
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=swqos
Group=swqos
ExecStart=/opt/swqos/swqos --config /etc/swqos/swqos.toml
RuntimeDirectory=swqos
RuntimeDirectoryMode=0750
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.targetRuntimeDirectory creates /run/swqos with the permissions IPC needs. Keep /opt/swqos writable for updates. If you add ProtectSystem=strict, add ReadWritePaths=/opt/swqos as well.
sudo systemctl daemon-reload
sudo systemctl enable --now swqos
systemctl status swqos
journalctl -u swqos -fOnce the listeners are open, check the local health route:
curl -sS http://127.0.0.1:8080/healthHTTP status 200 with ok means the agent has a region connection or current routing information. Status 503 with unhealthy means it is not ready. Health does not confirm that any transaction landed.
Stop and restart
Use systemctl stop swqos to stop the service or systemctl restart swqos to apply configuration changes. A foreground process also handles Ctrl-C.
A stop or automatic update closes local connections. HTTP and QUIC clients must reconnect; IPC clients must open a new session and repeat the handshake.
When a start fails
A start that fails prints error: <reason> to standard error, sometimes followed by caused by: <reason> lines, and exits with status 1. Under systemd these lines appear in journalctl -u swqos. Troubleshooting lists the messages and their fixes.