Skip to main content
Ted
Staff
Staff
January 26, 2026

Technical Tip: Monitoring active WebSocket connections using the CLI

  • January 26, 2026
  • 0 replies
  • 408 views
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
metrics Performance metrics.
websocket Dump active WebSocket connections.

 

Example output:

 

CREATE-GUI web socket connection.png

 

FortiGate-VM64 # diagnose web-svc performance websocket
Active connections: 4

# | Source | IP | Time
1 | 0 | 10.0.120.3 | Thu Jan 15 21:29:51
2 | 0 | 10.0.1.11 | Thu Jan 15 21:29:51
3 | 0 | 10.0.120.3 | Thu Jan 15 21:29:51
4 | 0 | 10.0.1.10 | Thu Jan 15 21:29:51

 

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.