Monitor the Interface Bandwidth usage.
This is installed into the following directory:
root@nas:/opt/sbin# ls
iftop
Working, but not seeing eth0:
root@nas:/opt/sbin# ./iftop
interface: eth0
Unable to get IP address for interface: eth0
ioctl(SIOCGIFADDR): Cannot assign requested address
MAC address is: 00:d0:b8:15:bf:dd
pcap_open_live(eth0): eth0: That device is not up
You can specify the interface to listen on:
root@nas:/opt/sbin# ifconfig
eth1 Link encap:Ethernet HWaddr 00:d0:b8:15:bf:dd
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:191293470 errors:0 dropped:0 overruns:0 frame:0
TX packets:127492945 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:3762986736 (3.5 GiB) TX bytes:2605101512 (2.4 GiB)
Interrupt:15
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2440031 errors:0 dropped:0 overruns:0 frame:0
TX packets:2440031 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:683505235 (651.8 MiB) TX bytes:683505235 (651.8 MiB)
So we want eth1
root@nas:/opt/sbin# ./iftop -i eth1
interface: eth1
IP address is: 192.168.0.2
MAC address is: 00:d0:b8:15:bf:dd
Now, I like to have an alias for this:
root@nas:/# vim .bash_aliases
lias iftop="/opt/sbin/iftop -i eth1"
Activate the new alias
root@nas:/# . .bash_aliases
root@nas:/#