ZeroCopyZeroCopy
Local agent

Run the agent

Check the agent, run it as a service and reconnect clients after a restart.

Arguments

Use these command-line options:

ArgumentEffect
--config <path>Reads the configuration from <path>. Always pass it.
--canaryChecks startup and region connectivity, prints the release number and exits

Check with --canary

Check the agent before you start it
sudo -u swqos /opt/swqos/swqos --config /etc/swqos/swqos.toml --canary

The check loads your configuration and license, then checks that a region answers. On success it exits with status 0 and prints:

Output of a passing check
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:

Run the agent in a terminal
sudo install -d -o swqos -g swqos -m 0750 /run/swqos
sudo -u swqos /opt/swqos/swqos --config /etc/swqos/swqos.toml

The 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

/etc/systemd/system/swqos.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.target

RuntimeDirectory 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.

Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable --now swqos
systemctl status swqos
journalctl -u swqos -f

Once the listeners are open, check the local health route:

Check the agent's health
curl -sS http://127.0.0.1:8080/health

HTTP 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.

On this page