Last active
January 8, 2022 17:29
-
-
Save ork/097bbce05499768dee4c to your computer and use it in GitHub Desktop.
Network interface stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awk -F ' ' 'NR > 2 {printf("%-20s\n\tRX%15s packets\n\t%17s bytes\n\tTX%15s packets\n\t%17s bytes\n", $1, $3, $2, $11, $10);}' < /proc/net/dev | |
wlp2s0: | |
RX 13207 packets | |
2346094 bytes | |
TX 212 packets | |
44302 bytes | |
lo: | |
RX 131602 packets | |
13078892 bytes | |
TX 131602 packets | |
13078892 bytes | |
enp3s0: | |
RX 504123 packets | |
632168200 bytes | |
TX 343279 packets | |
32373273 bytes | |
# ifconfig is deprecated, use iproute2! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment