Skip to contentSkip to conversation

Measuring throughput

LARTC Kenneth Porter 7 participants 7 messages Feb 6, 2003 – Feb 10, 2003

lore
Share & tools
lore
#0 lore raw

I'm running a game server which uses a lot of UDP traffic on a 4 Mbps connection. I'd like to figure out how much of that I'm really using (inbound vs. outbound) and I'd like to verify my bandwidth cap.

The host also runs a web and FTP server and I'm running wshaper to keep those from hurting game traffic. But I'm concerned that it might be artificially capping my bandwidth and that I might need to tweak it.

I've got ntop running (http://matureasskickers.net:3000/) and it tells me that in a massive game last night (50 players) I used 2.2 Mbps, but I don't know whether that's inbound, outbound, or the sum of both. Is there another tool better for this measurement?

I'd like to simulate lots of game traffic by flooding UDP packets out of the box (say, to my home system) to verify the bandwidth cap. What tool would be good for doing that? (The Slapper worm doesn't count! ;))
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Install a program called nload or iptraf. Nload very simply gives you the current in and out of whatever interface your specify along with an average. Here's the command I use:
nload -i 2048 -o 384 -s 9 -t 1000 -u k -U m eth0 eth1
This tells to set the incoming graph at 2Mbit max, outgoing graph at 384kbit max, -s 9 smoother average bandwidth number, -u is traffic number units (bit/s, kbit/s, mbit/s, gbit/s), and -U is the units for the amount of data in/out. The m lets me see rates for eth0 and eth1 (multiple interfaces).

Iptraf is much more of a full featured network monitoring program and I highly recommend it as well as nload. Iptraf can give you the basic in/out stats of your network along with much more. I use iptraf when I want to monitor the bandwidth usage of a specific connection and nload when I want the overall picture of how much data is being transferred in and out.

Patrick

-----Original Message-----
From: Kenneth Porter [mailto:[email protected]]
Sent: Thursday, February 06, 2003 10:30 AM
To: LARTC List
Subject: [LARTC] Measuring throughput

I'm running a game server which uses a lot of UDP traffic on a 4 Mbps connection. I'd like to figure out how much of that I'm really using (inbound vs. outbound) and I'd like to verify my bandwidth cap.

The host also runs a web and FTP server and I'm running wshaper to keep those from hurting game traffic. But I'm concerned that it might be artificially capping my bandwidth and that I might need to tweak it.

I've got ntop running (http://matureasskickers.net:3000/) and it tells me that in a massive game last night (50 players) I used 2.2 Mbps, but I don't know whether that's inbound, outbound, or the sum of both. Is there another tool better for this measurement?

I'd like to simulate lots of game traffic by flooding UDP packets out of the box (say, to my home system) to verify the bandwidth cap. What tool would be good for doing that? (The Slapper worm doesn't count! ;))
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Kenneth Porter

Another way may be using iptables accounting..for example:

iptables -N udp-out
iptables -A udp-out -j accept

iptables -N udp-in
iptables -A udp-in -j accept

iptables -A input -p udp -j udp-in
iptables -A output -p udp -j udp-out

you can see this with:
iptables -L -n -v -x

..i have some perl scripts to show that in graphs (rrdtool, gnuplot, etc)...

saludos
Esteban.

Quoted 47 lines · Patrick Nehls

Install a program called nload or iptraf. Nload very simply gives you the current in and out of whatever interface your specify along with an average. Here's the command I use:
nload -i 2048 -o 384 -s 9 -t 1000 -u k -U m eth0 eth1
This tells to set the incoming graph at 2Mbit max, outgoing graph at 384kbit max, -s 9 smoother average bandwidth number, -u is traffic number units (bit/s, kbit/s, mbit/s, gbit/s), and -U is the units for the amount of data in/out. The m lets me see rates for eth0 and eth1 (multiple interfaces).

Iptraf is much more of a full featured network monitoring program and I highly recommend it as well as nload. Iptraf can give you the basic in/out stats of your network along with much more. I use iptraf when I want to monitor the bandwidth usage of a specific connection and nload when I want the overall picture of how much data is being transferred in and out.

Patrick

-----Original Message-----
From: Kenneth Porter [mailto:[email protected]]
Sent: Thursday, February 06, 2003 10:30 AM
To: LARTC List
Subject: [LARTC] Measuring throughput

I'm running a game server which uses a lot of UDP traffic on a 4 Mbps connection. I'd like to figure out how much of that I'm really using (inbound vs. outbound) and I'd like to verify my bandwidth cap.

The host also runs a web and FTP server and I'm running wshaper to keep those from hurting game traffic. But I'm concerned that it might be artificially capping my bandwidth and that I might need to tweak it.

I've got ntop running (http://matureasskickers.net:3000/) and it tells me that in a massive game last night (50 players) I used 2.2 Mbps, but I don't know whether that's inbound, outbound, or the sum of both. Is there another tool better for this measurement?

I'd like to simulate lots of game traffic by flooding UDP packets out of the box (say, to my home system) to verify the bandwidth cap. What tool would be good for doing that? (The Slapper worm doesn't count! ;))
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Signature · 13 lines
Esteban Ribicic
Network Operation Center
UOL-Sinectis S.A.

Florida 537 Piso 6, Buenos Aires, Argentina 
+54-11-4321-9110 ext 2503
+54-11-4321-9107 Directo
[email protected]
www.uolsinectis.com

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#3 lore raw
In reply to Kenneth Porter
Quoted 2 lines

iptables -N udp-out
iptables -A udp-out -j accept

Unless you really want to accept the packets, leave -j ACCEPT out (assuing you have a rule that accepts the traffic later or your default policy is set to ACCEPT). The packet and bytecounters will still increase.

Quoted 2 lines

iptables -N udp-in
iptables -A udp-in -j accept

Same here.

Quoted 5 lines

iptables -A input -p udp -j udp-in
iptables -A output -p udp -j udp-out

you can see this with:
iptables -L -n -v -x

iptables -nvxL udp-in
Would give you incoming udptraffic while
iptables -nvxL udp-out
would give you egress udptraffic.

Quoted 13 lines

saludos
Esteban.

Signature · 9 lines
Esteban Ribicic
Network Operation Center
UOL-Sinectis S.A.

Florida 537 Piso 6, Buenos Aires, Argentina 
+54-11-4321-9110 ext 2503
+54-11-4321-9107 Directo
[email protected]
www.uolsinectis.com
Signature · 7 lines
Sincerely,
Patrik Hildingsson
KurD@EFnet/linknet, kurdel@DALnet
+46 709 285 445
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#4 lore raw
In reply to Kenneth Porter

I personally like using rrdtool with snmp. Its a bit more difficult to setup than some tool like iptraf, but it gives you a nice graph of whats going on. It also keeps a set history of data so you can view trends, etc.

Jay

----- Original Message -----
From: "Kenneth Porter" <[email protected]>
To: "LARTC List" <[email protected]>
Sent: Thursday, February 06, 2003 1:29 PM
Subject: [LARTC] Measuring throughput

Quoted 10 lines

I'm running a game server which uses a lot of UDP traffic on a 4 Mbps connection. I'd like to figure out how much of that I'm really using (inbound vs. outbound) and I'd like to verify my bandwidth cap.

The host also runs a web and FTP server and I'm running wshaper to keep those from hurting game traffic. But I'm concerned that it might be artificially capping my bandwidth and that I might need to tweak it.

I've got ntop running (http://matureasskickers.net:3000/) and it tells me that in a massive game last night (50 players) I used 2.2 Mbps, but I

don't

Quoted 1 line

know whether that's inbound, outbound, or the sum of both. Is there

another

Quoted 9 lines

tool better for this measurement?

I'd like to simulate lots of game traffic by flooding UDP packets out of the box (say, to my home system) to verify the bandwidth cap. What tool would be good for doing that? (The Slapper worm doesn't count! ;))
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#5 lore raw
In reply to Kenneth Porter
Quoted 8 lines · Esteban Ribicic

Another way may be using iptables accounting..for example:

iptables -N udp-out
iptables -A udp-out -j accept

iptables -N udp-in
iptables -A udp-in -j accept

Quoted 8 lines

iptables -A input -p udp -j udp-in
iptables -A output -p udp -j udp-out

you can see this with:
iptables -L -n -v -x

..i have some perl scripts to show that in graphs (rrdtool, gnuplot, etc)...

I also have some scripts. They are integrated in a bigger set of scripts. You can download it from www.docum.org on the gui page.
If you are interested in the rrd scripts, you need the get_snmp.pl : it updates the rrd files and the tcrrd.pl script : it generates the graphics on the fly in a web browser. The get_snmp.pl creates also a html page to view the graph. Maybe you can use these scripts as an example to create your own. I started with the larrd extension for BigBrother (bb4.com). I used the larrd.pl script as an example to create my own set of scripts. Once you know how it works, it's easy to graph whatever you want.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#6 lore raw
In reply to Kenneth Porter

In the context of collecting stats, is there any difference between these two ?

iptables -A udp-out

and

iptables -A udp-out -j RETURN

There is no mentioned about how to jump from existing built-in/or predefined chains, I supposed it is something like this ?

       iptables -I FORWARD -j udp-out -p xxx -i xxx -o xxx --sport

xxx --dport xxx ....and so on

Insert is used here so that it get invoked before being handled by other rules in the chain and
RETURN is used in the user defined chain so that existing firewall rules are not disrupted.
Any comments ?

Rgds.
----- Original Message -----
From: "Patrik Hildingsson" <[email protected]>
To: <[email protected]>
Sent: Friday, February 07, 2003 7:56 AM
Subject: Re: [LARTC] Measuring throughput

Quoted 4 lines
Quoted 2 lines

iptables -N udp-out
iptables -A udp-out -j accept

Unless you really want to accept the packets, leave -j ACCEPT out (assuing

you have a rule that accepts the traffic later or your default policy is set to ACCEPT). The packet and bytecounters will still increase.

Quoted 1 line

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/