1and1 Help Centre Categories

print article

Check the Amount of Used Traffic (Linux Server)

All traffic arriving or leaving your Root-Server will be accounted for and be billed. The traffic quota for your dedicated server can not be exceeded during any billing period. Once again, the traffic quota is set for the billing period of your contract rather than that of the calendar month (the first day of the month to the last). Please contact our support if you would like to confirm your billing cycle for a given contract so that you do not exceed the traffic quota for the billing period.

The monthly (from the first day of the month up until the current date) traffic will be shown in the 1&1 Control Panel. The traffic usage shown in the 1&1 Control Panel will not include traffic accumulated for the current day! The traffic shown will be the accumulated traffic from the first of the current month to the previous day (yesterday). This is a good guide to estimate your traffic usage but will only indicate your traffic accumulated for the month thus far and is not a valid metric to determine if you will exceed your traffic quota for the billing period!

To check the monthly traffic usage thus far:

Step 1
Log in to your 1&1 Control Panel and select the relevant package.
Step 2
Scroll all the way to the bottom of the page and click the Package Usage link.
Account Management panel
Account Management panel
Step 3
The next page will show your current traffic for the current month thus far. This is a good guide to estimate your traffic usage but will only indicate your traffic accumulated for the month thus far and is not a valid metric to determine if you will exceed your traffic quota for the billing period! Please read the beginning of the article for more information about the traffic quota.
Package information menu
Package information menu

To check the amount of incoming and outgoing traffic since the last reboot of your Root-Server please do the following through SSH:Monitor traffic with iptables:

To view the traffic since the last reboot please enter:

p12345678:~ # iptables -L -v | grep Chain
Chain INPUT (policy ACCEPT 533478 packets, 176421581 bytes)
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
Chain OUTPUT (policy ACCEPT 1132268 packets, 1367556267 bytes)

This displays the traffic in the three standard rule-chains
INPUT: all incoming packets
FORWARD: all forwarded packets
OUTPUT: all outgoing packets

You may define rules using ipchains which will monitor traffic to/from certain machines. The example shows the traffic to and from the backup server being displayed separately.

p12345678:~ # iptables -A INPUT --source backup01.pureserver.de --jump ACCEPT
p12345678:~ # iptables -A INPUT
p12345678:~ # iptables -A OUTPUT --destination backup01.pureserver.de --jump ACCEPT
p12345678:~ # iptables -A OUTPUT
p12345678:~ # iptables -L -v
Chain INPUT (policy ACCEPT 533478 packets, 176421581 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any backup01.pureserver.de anywhere
20 1260 all -- any any anywhere anywhere

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 1132268 packets, 1367556267 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere backup01.pureserver.de
39 2944 all -- any any anywhere anywhere

As you can see here a rule which was generated a few seconds ago obviously only reflects the traffic incurred since the rule was created.

It will very much be worth your while to get yourself familiarized with iptables, as these commands are also used for building a Packet Filtering Firewall.

You may also choose to monitor traffic using an application or daemon such as bandwidthd, dstat, etc.

For additional information, you may want to reference: