De acordo com o ifconfig man:
Este programa está obsoleto! Para substituição verifique ip addr e ip
ligação. Para estatísticas, use ip -s link.
Então, usando o comando ip :
$ ip -s link
Podemos obter estatísticas da rede:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
173654497900 26078946 0 0 0 0
TX: bytes packets errors dropped carrier collsns
173654497900 26078946 0 0 0 0
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 12:34:56:78:90:00 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
3650412438854 399476618 0 2551849 0 0
TX: bytes packets errors dropped carrier collsns
617437624480 321390259 0 0 0 0
Ou
$ ip -s -h link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 addrgenmode eui64
RX: bytes packets errors dropped overrun mcast
174G 26.1M 0 0 0 0
TX: bytes packets errors dropped carrier collsns
174G 26.1M 0 0 0 0 2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 12:34:56:78:90:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64
RX: bytes packets errors dropped overrun mcast
3.65T 399M 0 2.55M 0 0
TX: bytes packets errors dropped carrier collsns
617G 321M 0 0 0 0