Artificial intelligent assistant

What do `<expire_time>` and `<retrans>` mean in the output of `ss -o`? `ss -o` shows TCP timer in the following format: timer:(<timer_name>,<expire_time>,<retrans>) What do `<expire_time>` and `<retrans>` mean? I found `<expire_time>` counts down to zero and then restart counting from some number again. Its starting value differs from TCP socket to TCP socket. `<retrans>` seems always zero for all the TCP sockets.

`expire_time` is the time left until the timer expires. The TCP stack in the Linux kernel supports a number of timers, and they all have an expiration time.

`retrans` is the number of retransmissions which have occurred. TCP implementations retransmit packets they believe have been lost; they counts these retransmissions so that they will know when to give up. You shouldn’t see this too often; one way to force it is to try to open a connection on a port which isn’t rejected immediately, _e.g._ (based on an example in one of your previous questions):


curl


If you run that, you’ll see `curl` sitting there for a while, and `ss -o` will show a `SYN-SENT` entry with an increasing retransmission count. You’ll also see the back-off applied in such circumstances: the initial expiration time will increase every time the packet is retransmitted.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a0c70e23d5427ccdffee05c9a4a37749