Is there a command that returns network utilization?
ifstat
doesnt require root. Run it with -S
to update the current line instead of printing a new line for each measurement.
egil@mutter:~$ ifstat -S
eth0
KB/s in KB/s out
0.13 0.26
bmon runs without root:
If you give it the right parameters it returns only one line
bmon -o 'ascii:noheader;quitafter=1' -p wlan0
wlan0 0.00B 0.0 0.00B 0.0
maybe this helps
Try iftop...
but I think that for this you need root privileges.
Here is a shell script that prints a short line with realtime data:
#!/bin/bash
ifstat -q -i wlan0 -S 0.1 1 | perl -n -e '/(\d+\.\d+).*(\d+\.\d+)/ && print "Down: $1 KBps - Up: $2 KBps\n"'
Sample Output:
Down: 4.25 KBps - Up: 0.00 KBps
Special thanks to Egil for his answer which pointed me to ifstat
.