我想知道在 tcp 套接字上传输了多少字节(顺便说一下,我使用的是 Ubuntu 18.04)。我试过ss命令,但似乎ss只能显示bytes_received,而不是bytes_sent。那么有什么方法可以显示套接字的 bytes_sent 吗?为什么这个数字没有显示在ss中?我认为 bytes_received 和 bytes_sent 密切相关。
> ss -ti
ESTAB 0 0 host1:ssh host2:7703
cubic wscale:2,8 rto:384 rtt:181.622/16.823 ato:40 mss:1452 cwnd:10
ssthresh:118 bytes_acked:120873541 bytes_received:1151501 segs_out:87562
segs_in:39194 send 639.6Kbps lastsnd:11732 lastrcv:11564 lastack:11564
pacing_rate 1.3Mbps retrans:0/203 reordering:56 rcv_rtt:11516 rcv_space:71360