I want to find out how many bytes are transmitted on a tcp socket (I'm using Ubuntu 18.04, by the way). I tried the ss command, but it seems ss can only show the bytes_received, not bytes_sent. So is there any way to show bytes_sent for a socket? And why is this number not shown in ss? I think bytes_received and bytes_sent are closely related.
> 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