Sir,
There are a few simple methods to measure bandwidth.
I understand your looking from the command line - but not really sure if this is a true measure of what your actually looking for... so I will try to help you in a few ways...
1. IFTOP (
http://www.ex-parrot.com/~pdw/iftop/) iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question "why is our ADSL link so slow?".
image of IFTOP --->
2. NETSTAT:
netstat -i (interface)
This command will give you a basic overview of networking on your box. From your local loopback, to any and all network cards in your box.
Using netstat alone - will give you some quick information... like a list of active connections, what protocol the connection is using, --- if you add -a it will also list what ports you server is actually listening on ( netstat -a )
netstat -ap )all and rpocess information/pid) is an excellent command for finding a bulk of information -a (like mentioned above) gives you a list of all listening and active connections, the -p gives you the process information - the process name and the pid of the program... (great if you need to kill some run away process...)
netstat -c shows you a continuous listing of the command --- great to see what is going on ...
3. Visit this link:
http://www.linuxlinks.com/Software/Monitoring/Network/ for some excellent tools that you can install - such as MRTG, and others...
Do you have additional servers? or is this the only 1?
I personally like rrdtool - a great tool to measure traffic on a switch talking via snmp
Another option is to ask your datacenter to provide these reports to you in real time...
4. Are you trying to test your speed? maximum bandwidth?
if so there are a few ways to do this --- this is a great test to give back to your datacenter to make sure they have you on a 100mbps port if your paying for it - vs. a 10mbps
http://dast.nlanr.net/projects/Iperf/ and also www.
(will add a bit more in a few --- using cell to type the answer <sucks with tiny buttons> )