Technical Tip: Monitoring active WebSocket connections using the CLI
| Description | This article describes the new diagnostic CLI command, which helps administrators quickly view active WebSocket connections on a FortiGate device. The command provides a concise snapshot of current WebSocket sessions, including source IPs and connection timestamps, which is useful for troubleshooting GUI/API real‑time features, FortiView live updates, and other components that rely on WebSocket transport. |
| Scope | FortiGate. |
| Solution | The diagnose web-svc performance command now includes an additional sub-option websocket to dump statistics of active WebSocket connections currently managed by the system.
Parent command help:
FortiGate-VM64 # diagnose web-svc performance
Example output:
FortiGate-VM64 # diagnose web-svc performance websocket # | Source | IP | Time
The output provides the total count of active WebSocket connections, the associated source indices, the client IP addresses, and the corresponding connection timestamps. A user can utilize this command when troubleshooting WebSocket-related performance or connectivity issues in FortiGate administrative web sessions or diagnostic environments. It helps to identify which clients are maintaining active WebSocket channels. |

