Created
June 26, 2012 13:40
-
-
Save abhiomkar/2995845 to your computer and use it in GitHub Desktop.
One Liner to get Network Data Received
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
# 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