Skip to contentSkip to conversation

measure traffic

DISCUSSION Antony Stone 4 participants 4 messages Oct 7, 2002 – Oct 8, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 200210080025.26576@.

#1 lore raw
Quoted 6 lines · PayalR

Hi,
I have a small urgent problem. As I told you all before, I have my single Linux box at a server farm where I have to pay per Mb of data transmitted. I have a doubt that those guys there are cheating me. They are taking more money than actual data transmitted. Can I use iptables to log all incoming and outgoing data and see total incoming/outgoing data in a day/week/month?

Why not just use the byte counters in ifconfig ?

eg: ifconfig eth1

eth1 Link encap:Ethernet HWaddr 00:02:2D:05:3F:8D
inet addr:192.168.44.101 Bcast:192.168.44.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:1930 errors:0 dropped:0 overruns:0 frame:0 TX packets:1950 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:912045 (890.6 Kb) TX bytes:265386 (259.1 Kb) Interrupt:9 Base address:0x100

So this machine I'm on now has received 912045 bytes and sent 265386 bytes since the interface was initialised....

Antony.

Signature · 2 lines
The difference between theory and practice is that
in theory there is no difference, whereas in practice there is.
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Then you can plot them onto rolling graphs using mrtg, looks very pretty. I have a small shell script that reads the byte counters from the /proc tree, resets them and plots the results.

Regards
Alasdair

Antony Stone wrote:

| On Monday 07 October 2002 7:58 pm, PayalR wrote:
|
|
|>Hi,
|>I have a small urgent problem. As I told you all before, I have my single
|>Linux box at a server farm where I have to pay per Mb of data transmitted.
|>I have a doubt that those guys there are cheating me. They are taking more
|>money than actual data transmitted. Can I use iptables to log all incoming
|>and outgoing data and see total incoming/outgoing data in a
day/week/month?
|
|
| Why not just use the byte counters in ifconfig ?
|
| eg: ifconfig eth1
|
| eth1      Link encap:Ethernet  HWaddr 00:02:2D:05:3F:8D
|           inet addr:192.168.44.101  Bcast:192.168.44.255
Mask:255.255.255.0
|           UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
|           RX packets:1930 errors:0 dropped:0 overruns:0 frame:0
|           TX packets:1950 errors:0 dropped:0 overruns:0 carrier:0
|           collisions:0 txqueuelen:100
|           RX bytes:912045 (890.6 Kb)  TX bytes:265386 (259.1 Kb)
|           Interrupt:9 Base address:0x100
|
| So this machine I'm on now has received 912045 bytes and sent 265386
bytes
| since the interface was initialised....
|
| Antony.
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9oql54+7BX0uR648RAiVmAJ98GbbdRT1ju5fq6DVUGGv3SC87ZgCfQbsb klhUAERGjgpRGhjllZ5GWBo=
=GfdD
-----END PGP SIGNATURE-----

#3 lore raw
In reply to Antony Stone

Hi,
Thanks a lot all for the mail.
Well, I was thining more on lines of traffic every hour/day/week/month etc. Cos' then I can challenge the server farm guys that their stats are wrong.
Well, about ipac-ng I heard it has some problems with iptables 1.2.5 and kernel 2.4.x. Does it work properly with these two?
Thanks a lot and bye.
-Payal

Quoted 31 lines · Antony Stone
Quoted 6 lines · PayalR

Hi,
I have a small urgent problem. As I told you all before, I have my single Linux box at a server farm where I have to pay per Mb of data transmitted. I have a doubt that those guys there are cheating me. They are taking more money than actual data transmitted. Can I use iptables to log all incoming and outgoing data and see total incoming/outgoing data in a day/week/month?

Why not just use the byte counters in ifconfig ?

eg: ifconfig eth1

eth1 Link encap:Ethernet HWaddr 00:02:2D:05:3F:8D
inet addr:192.168.44.101 Bcast:192.168.44.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:1930 errors:0 dropped:0 overruns:0 frame:0 TX packets:1950 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:912045 (890.6 Kb) TX bytes:265386 (259.1 Kb) Interrupt:9 Base address:0x100

So this machine I'm on now has received 912045 bytes and sent 265386 bytes since the interface was initialised....

Antony.

Signature · 2 lines
The difference between theory and practice is that
in theory there is no difference, whereas in practice there is.
#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · PayalR

I have a small urgent problem. As I told you all before, I have my single Linux box at a server farm where I have to pay per Mb of data transmitted. I have a doubt that those guys there are cheating me. They are taking more money than actual data transmitted. Can I use iptables to log all incoming and outgoing data and see total incoming/outgoing data in a day/week/month? What do i have to do? Is there any specific package available for it?

Use ipac-ng (http://sourceforge.net/projects/ipac-ng/).

Signature · 1 line
Martijn