Click to See Complete Forum and Search --> : Measuring total data transferred (eth0)


medicdave
01-27-2003, 04:39 PM
My Linux server is currently hosted on a network where I am without significant "bandwidth restrictions" - i.e. I don't have a cap on the amount of data I can move per month. I may have to move to another provider where I would have a total throughput limit.

Is there any way to monitor eth0 and measure the total throughput over a period of, say, a week? Also, it would be good if I could separate the results into incoming and outgoing throughput.

Searches for bandwidth and throughput measurement tools only turn up tools designed to test how fast an interface can go...

FYI I am running a RedHat 7.3 box with Apache, SSH and FTP services running over 100-baseT ethernet.

Thanks,
Dave
Rochester, NY

Gaston
01-27-2003, 05:47 PM
You could use tcpdump -c

Or to write to a file..

tcpdump -c > testfile

Where ">" is to redirect the standard output to a file.
Be prepared for loads of output....

Also you want to read man tcpdump for more information/options.


Also you might wanna check this out:

http://www.volny.cz/linux_monitor/

And do a search on google for more linux monitoring tools.

bwkaz
01-27-2003, 06:52 PM
Or just use ifconfig:

$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:02:E3:0A:43:1E
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:99522 errors:0 dropped:0 overruns:0 frame:0
TX packets:97928 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
[b]RX bytes:94031332 (89.6 Mb) TX bytes:16449713 (15.6 Mb)
Interrupt:10 Of course, that only works between reboots, so you'd have to not reboot for the week. This data is for me for two days, so ... wow.

filp
01-27-2003, 07:01 PM
I use MRTG for some nice graphs and averages. Because you can use it with SNMP you can monitor many network resources. It's a piece of cake to setup.

Seeya,
Filp.