Reference
show sess
Terminology change
- As of HAProxy 2.9 and HAProxy Enterprise 2.9r1, sessions are replaced with streams.
Display all clients that have ongoing active streams (formerly called sessions) connected to the load balancer.
Description Jump to heading
Display all clients that have ongoing active streams connected to the load balancer. This information is useful for the HAProxy Technologies development and support teams. The output may change from version to version.
When a client connects to the load balancer, the load balancer maintains the stream with the client until their connection with the backend server has finished. To use the show sess command, the level parameter on the stats socket line must be operator or admin. It displays all active streams that are currently connected to the load balancer.
Examples Jump to heading
All streams Jump to heading
Dumping multiple streams can produce an excessive amount of output and consume an excessive amount of time and CPU resources. It is recommended that you dump the minimum required stream information.
In the example below, there are two active streams. The first is a TCP connection and the second is a UNIX socket stream (the Runtime API connection itself):
nix
nix
outputtext
outputtext
Single stream Jump to heading
Display details for a single stream by specifying the stream identifier:
nix
nix
outputtext
outputtext
Streams by age Jump to heading
Available since
- HAProxy 2.9
- HAProxy Enterprise 2.9r1
Display only streams older than <age> (in seconds by default):
nix
nix
outputtext
outputtext
Suspicious streams Jump to heading
Available since
- HAProxy 2.9
- HAProxy Enterprise 2.9r1
Specify the susp parameter to report streams that are considered suspicious by developers. The criteria for this consideration may change from version to version.
nix
nix
outputtext
outputtext
Show the URI Jump to heading
Available since
- HAProxy 3.1
- HAProxy Enterprise 3.1r1
Add the show-uri argument to include the URI requested in an active stream. In the example below, the output includes uri="GET /example/ HTTP/1.1".
nix
nix
outputtext
outputtext
Filter streams Jump to heading
Available since
- HAProxy 3.2
- HAProxy Enterprise 3.2r1
You can filter the list of streams to list only streams attached to a specific backend, frontend, or combination of backend and server.
In the example below, we filter the streams to show only those attached to the backend be_app and server app1:
nix
nix
outputtext
outputtext
Display help Jump to heading
Available since
- HAProxy 3.1
- HAProxy Enterprise 3.1r1
To show the available options for the show sess command, use the option help.
nix
nix
outputtext
outputtext
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?