On Cisco IOS, this is a very useful command “show tcp vty xx” to show TCP statistics of the VTY session. If you think your terminal is running slow because of packet loss or delay then this command will provide visibility. The other cause is the CPU/Memory running slow if you don’t see any errors on the TCP (as you can see below).
You will need to run the command for each VTY in use, but mostly I use for myself to check if its the network or the box.
It can also be useful for packet capture filtering of the console session since the source port of SSH Client is shown here.
If the link is lossy then look at the “datagrams” section and check the Smooth Round Trip Time (SRTT).
r1#sh tcp vty 0
tty66, virtual tty from host 192.168.10.130 Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Local host: 10.216.4.10, Local port: 22 Foreign host: 192.168.10.130, Foreign port: 54596
Enqueued packets for retransmit: 1, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x18C84473E): Timer Starts Wakeups Next Retrans 409 0 0x18C844865 TimeWait 0 0 0x0 AckHold 321 1 0x0 SendWnd 0 0 0x0 KeepAlive 824 0 0x18C853196 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0
iss: 2955761392 snduna: 2955805244 sndnxt: 2955805264 sndwnd: 65535 irs: 472603036 rcvnxt: 472609745 rcvwnd: 3908 delrcvwnd: 220
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms minRTT: 4 ms, maxRTT: 401 ms, ACK hold: 200 ms Flags: passive open, higher precedence, retransmission timeout keepalive running, nagle
TCB is waiting for TCP Process (139)
Datagrams (max data segment is 536 bytes): Rcvd: 778 (out of order: 0), with data: 321, total data bytes: 6708 Sent: 503 (retransmit: 0, fastretransmit: 0), with data: 441, total data bytes: 43871 lontrm01#
Well how nifty is that… thanks for pointing it out!
Many bloggers nowadays seem to focus on being ‘thought leaders’ . It’s nice to see some good old fashioned tips and tricks posts!