strongSwan exposes runtime state throughDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
swanctl commands backed by the VICI interface. You can inspect active Security Associations, track traffic counters, view kernel policies, query IP pool utilization, and stream live log output — all without restarting the daemon.
Listing active Security Associations
Reading the IKE_SA line
| Field | Example | Meaning |
|---|---|---|
| Connection name | gw-gw | Name from swanctl.conf. |
| Unique ID | #1 | Runtime identifier for this SA instance. |
| State | ESTABLISHED | IKE_SA is up and authenticated. |
| IKE version | IKEv2 | Protocol version in use. |
| Initiator SPI | aef372b5d74e2e0e_i* | * marks the role this node holds. |
| Local identity | 'gateway.example.com' | Authenticated local ID. |
| Remote identity | 'peer.example.com' | Authenticated remote ID. |
| Algorithms | AES_CBC-256/... | Encryption/integrity/PRF/DH suite. |
| Timing | established 1842s ago | Seconds since the IKE_SA was established. |
Reading the CHILD_SA block
| Field | Example | Meaning |
|---|---|---|
| Name | net | CHILD_SA configuration name. |
| Request ID | reqid 1 | Used to correlate kernel policies. |
| State | INSTALLED | Kernel SA and policies are active. |
| Mode | TUNNEL | ESP encapsulation mode (TUNNEL or TRANSPORT). |
| Cipher | AES_GCM_16-256 | ESP encryption algorithm. |
| Inbound SPI | c3a7e891 | Kernel inbound SA handle. |
| Traffic | 8765 bytes, 112 packets | Counters since installation. |
| Traffic selectors | 10.0.0.0/24 / 10.1.0.0/24 | Protected subnets. |
Filtering output
Daemon statistics
| Field | Description |
|---|---|
uptime | How long charon has been running and its start timestamp. |
worker threads | Total threads and idle count. working shows active jobs per priority (critical/high/medium/low). |
job queues | Pending jobs in each priority queue. |
jobs scheduled | Number of timer-based jobs queued (rekeys, DPD checks, etc.). |
IKE_SAs | Total established IKE_SAs and count of half-open (unauthenticated) SAs. |
loaded plugins | All active charon plugins. |
IKE event counters
Thecounters plugin (when loaded) tracks per-event counts for IKE protocol activity. These counters survive individual SA lifetimes and accumulate across renegotiations.
Counters are provided by the
counters plugin. Ensure it is loaded by checking swanctl --stats output for counters in the plugin list.Live log streaming
log VICI event stream and prints messages as they arrive. Press Ctrl+C to disconnect.
thread[group] message. The log command captures levels 0 (critical) and 1 (default) only — it does not reflect higher verbosity configured via file or syslog destinations.
Traffic policies
IP pool utilization
--leases:
online / offline / total lease counts.
Monitoring SA changes in real time
ike-updown and child-updown events and prints SA information as tunnels come up or go down. Useful for scripting alerting or logging SA lifecycle events.