Skip to content

Instantly share code, notes, and snippets.

@abhiomkar
Created June 26, 2012 13:40
Show Gist options
  • Save abhiomkar/2995845 to your computer and use it in GitHub Desktop.
Save abhiomkar/2995845 to your computer and use it in GitHub Desktop.
One Liner to get Network Data Received
# One Liner to get Network Data Received in GB
echo "`netstat -bi | grep -v Ibytes | grep -v "-" | grep "^en" | awk '{ x += $7 } END { print x / (1024 * 1024 * 1024) }'` + `netstat -bi | grep -v Ibytes | grep -v "-" | grep "^lo" | awk '{ x += $6 } END { print x / (1024 * 1024 * 1024) }'`" | bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment