6

I refresh every 10 seconds with this code

Change en0 to your proper device (check with ifconfig) Can also easily change the label of d(download) and u(upload) to whatever you like

## en0 input and output
sar -n DEV 1 7 | grep -i 'average.*en0'| awk '{printf "d:  %.2f Kbps\nu:  %.2f Kbps\n", $4 / 1024, $6 / 1024 }'

Comments

User Avatar
rockrabbit 1978 days ago
most excellent!

Thank you!
User Avatar
eigoud 1908 days ago
Thanks, works great.

Log in to comment or register here.