Reference

show sess

Display all clients that have an ongoing session connected to the load balancer.

Description Jump to heading

When a client connects to the load balancer, it maintains a session with that 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 sessions that are currently connected to the load balancer.

Examples Jump to heading

In the example below, there are two active sessions. The first is a TCP connection and the second is a UNIX socket stream (the Runtime API connection itself):

nix
echo "show sess" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show sess" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
text
0x7fa44c02a470: proto=tcpv4 src=192.168.50.1:62423 fe=fe_main be=websocket srv=server1 ts=00 age=16s calls=5 rate=0 cpu=0 lat=0 rq[f=8848000h,i=0,an=00h,rx=59m55s,wx=,ax=] rp[f=88048202h,i=0,an=00h,rx=59m55s,wx=,ax=] s0=[8,200008h,fd=19,ex=] s1=[8,200118h,fd=20,ex=] exp=59m50s
0x55e4db986ba0: proto=unix_stream src=unix:1 fe=GLOBAL be=<NONE> srv=<none> ts=00 age=0s calls=2 rate=2 cpu=0 lat=0 rq[f=c4c220h,i=0,an=00h,rx=,wx=,ax=] rp[f=80008002h,i=0,an=00h,rx=,wx=,ax=] s0=[8,280008h,fd=23,ex=] s1=[8,204018h,fd=-1,ex=] exp=10m
output
text
0x7fa44c02a470: proto=tcpv4 src=192.168.50.1:62423 fe=fe_main be=websocket srv=server1 ts=00 age=16s calls=5 rate=0 cpu=0 lat=0 rq[f=8848000h,i=0,an=00h,rx=59m55s,wx=,ax=] rp[f=88048202h,i=0,an=00h,rx=59m55s,wx=,ax=] s0=[8,200008h,fd=19,ex=] s1=[8,200118h,fd=20,ex=] exp=59m50s
0x55e4db986ba0: proto=unix_stream src=unix:1 fe=GLOBAL be=<NONE> srv=<none> ts=00 age=0s calls=2 rate=2 cpu=0 lat=0 rq[f=c4c220h,i=0,an=00h,rx=,wx=,ax=] rp[f=80008002h,i=0,an=00h,rx=,wx=,ax=] s0=[8,280008h,fd=23,ex=] s1=[8,204018h,fd=-1,ex=] exp=10m

Single session Jump to heading

You can also use show sess <id> where id can be a single session identifier or all sessions:

nix
echo "show sess 0x7f42a0048050" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show sess 0x7f42a0048050" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
text
0x7f42a0048050: [14/Jun/2023:17:15:04.943049] id=4478 proto=unix_stream source=unix:1
flags=0x8, conn_retries=0, conn_exp=<NEVER> conn_et=0x000 srv_conn=(nil), pend_pos=(nil) waiting=0 epoch=0x21
frontend=GLOBAL (id=0 mode=tcp), listener=? (id=1) addr=unix:1
output
text
0x7f42a0048050: [14/Jun/2023:17:15:04.943049] id=4478 proto=unix_stream source=unix:1
flags=0x8, conn_retries=0, conn_exp=<NEVER> conn_et=0x000 srv_conn=(nil), pend_pos=(nil) waiting=0 epoch=0x21
frontend=GLOBAL (id=0 mode=tcp), listener=? (id=1) addr=unix:1

All sessions Jump to heading

All session identifiers displayed:

nix
echo "show sess all" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show sess all" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
text
0x7f42a8047dd0: [14/Jun/2023:21:35:19.041357] id=4312 proto=unix_stream source=unix:1
flags=0x8, conn_retries=0, conn_exp=<NEVER> conn_et=0x000 srv_conn=(nil), pend_pos=(nil) waiting=0 epoch=0xb
frontend=GLOBAL (id=0 mode=tcp), listener=? (id=1) addr=unix:1
backend=<NONE> (id=-1 mode=-)
server=<NONE> (id=-1)
task=0x7f42a40674d0 (state=0x00 nice=-64 calls=1 rate=0 exp=<NEVER> tid=1(1/1) age=0s)
scf=0x7f42a8048340 flags=0x00000200 state=EST endp=CONN,0x7f42a805f660,0x028c0001 sub=1
co0=0x7f42a40611b0 ctrl=unix_stream xprt=RAW mux=PASS data=STRM target=LISTENER:0x5575f1621f00
flags=0x00000300 fd=25 fd.state=21 updt=1 fd.tmask=0x2
scb=0x7f42a803a210 flags=0x00000001 state=EST endp=APPCTX,0x7f42a804cae0,0x02800002 sub=0
app1=0x7f42a804cae0 st0=11 st1=0 applet=<CLI> tid=1 nice=-64 calls=1 rate=0
req=0x7f42a8047df0 (f=0xc08000 an=0x0 pipe=0 tofwd=-1 total=14)
an_exp=<NEVER> rex=<NEVER> wex=<NEVER>
buf=0x7f42a8047df8 data=0x7f42a803fce0 o=0 p=0 i=0 size=16384
res=0x7f42a8047e50 (f=0x80008000 an=0x0 pipe=0 tofwd=-1 total=0)
an_exp=<NEVER> rex=<NEVER> wex=<NEVER>
buf=0x7f42a8047e58 data=0x7f42a8043dc0 o=0 p=0 i=0 size=16384
output
text
0x7f42a8047dd0: [14/Jun/2023:21:35:19.041357] id=4312 proto=unix_stream source=unix:1
flags=0x8, conn_retries=0, conn_exp=<NEVER> conn_et=0x000 srv_conn=(nil), pend_pos=(nil) waiting=0 epoch=0xb
frontend=GLOBAL (id=0 mode=tcp), listener=? (id=1) addr=unix:1
backend=<NONE> (id=-1 mode=-)
server=<NONE> (id=-1)
task=0x7f42a40674d0 (state=0x00 nice=-64 calls=1 rate=0 exp=<NEVER> tid=1(1/1) age=0s)
scf=0x7f42a8048340 flags=0x00000200 state=EST endp=CONN,0x7f42a805f660,0x028c0001 sub=1
co0=0x7f42a40611b0 ctrl=unix_stream xprt=RAW mux=PASS data=STRM target=LISTENER:0x5575f1621f00
flags=0x00000300 fd=25 fd.state=21 updt=1 fd.tmask=0x2
scb=0x7f42a803a210 flags=0x00000001 state=EST endp=APPCTX,0x7f42a804cae0,0x02800002 sub=0
app1=0x7f42a804cae0 st0=11 st1=0 applet=<CLI> tid=1 nice=-64 calls=1 rate=0
req=0x7f42a8047df0 (f=0xc08000 an=0x0 pipe=0 tofwd=-1 total=14)
an_exp=<NEVER> rex=<NEVER> wex=<NEVER>
buf=0x7f42a8047df8 data=0x7f42a803fce0 o=0 p=0 i=0 size=16384
res=0x7f42a8047e50 (f=0x80008000 an=0x0 pipe=0 tofwd=-1 total=0)
an_exp=<NEVER> rex=<NEVER> wex=<NEVER>
buf=0x7f42a8047e58 data=0x7f42a8043dc0 o=0 p=0 i=0 size=16384

See also Jump to heading

Do you have any suggestions on how we can improve the content of this page?