Advertisement
MertcanGokgoz

Information about system network transmit and receive bytes

Dec 20th, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. # Bytes Receive
  2. ifconfig eth0 | awk '/RX bytes/ {print $2}' | awk -F: '{print $2}'
  3.  
  4. # Bytes Transmitted
  5. ifconfig eth0 | awk '/RX bytes/ {print $6}' | awk -F: '{print $2}'
  6.  
  7. # A human readable output
  8. ifconfig eth0 | awk '/RX bytes/ {print $3, $4}' # Received
  9. ifconfig eth0 | awk '/RX bytes/ {print $7, $8}' # Transmitted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement