Find per process bandwidth utilization
Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-1025-aws x86_64)
# cat /proc/2315/net/dev
Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 13477 132 0 0 0 0 0 0 13477 132 0 0 0 0 0 0 eth0: 1013996480 688315 0 0 0 0 0 0 4552419 63545 0 0 0 0 0 0 root@ip-172-31-17-138:/code/bwcalc
# cat /proc/2315/net/dev
Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 13477 132 0 0 0 0 0 0 13477 132 0 0 0 0 0 0 eth0: 1062890636 721060 0 0 0 0 0 0 4794623 67127 0 0 0 0 0 0
2315 is pid of wget downloading a file from external network.
1062890636-1013996480 = 48864156 ~ 48.864156 MBps
Similarly ~242204 Bytes has been send out by eth0 interface