# Network counters reset

## mrq

Hi all,

I have a server with two D-Link DGE-530T Gigabit Ethernet Adapter (rev 11) (driver skge) and one onboard RTL8139. My setup is as follows: 

eth0 -> DMZ (D-Link)

eth1 -> LAN (D-Link)

eth2 -> ISP (Realtek)

On the DMZ there is a web server serving high volumes of traffic.

When I look at ifconfig| grep TX I get something like this:

```

TX packets:6926293 errors:0 dropped:0 overruns:0 carrier:0

RX bytes:27656893 (26.3 Mb)  TX bytes:17465134 (16.6 Mb)

TX packets:3106715 errors:0 dropped:0 overruns:0 carrier:0

RX bytes:173682343 (165.6 Mb)  TX bytes:4107556193 (3917.2 Mb)

TX packets:38144615 errors:0 dropped:0 overruns:6 carrier:0

RX bytes:2664702774 (2541.2 Mb)  TX bytes:156594122 (149.3 Mb)

```

And one minute later:

```

TX packets:6933552 errors:0 dropped:0 overruns:0 carrier:0

RX bytes:27453869 (26.1 Mb)  TX bytes:17208846 (16.4 Mb)

TX packets:3106821 errors:0 dropped:0 overruns:0 carrier:0

RX bytes:173700155 (165.6 Mb)  TX bytes:4107607384 (3917.3 Mb)

TX packets:38158849 errors:0 dropped:0 overruns:6 carrier:0

RX bytes:2665249460 (2541.7 Mb)  TX bytes:177902090 (169.6 Mb)

```

The first problem: counters for eth0 reset approximately every second.

I can use iftop to see that the transfers are ok.

Ifstat output looks like this:

```

       eth0                eth1                eth2

 KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out

ifstat: warning: rollover for interface eth0, reinitialising.

    0.00      0.00      0.12      0.12      5.67    230.71

ifstat: warning: rollover for interface eth0, reinitialising.

```

The second problem, which I just realized:

there may be a problem with eth2 counter: the TX bytes is too small for the amount of data that came through that interface during last 4 hours, but RX looks OK.

Any ideas?

----------

## BradN

Any strange messages in dmesg?

----------

## mrq

No, nothing special.

----------

## BradN

There must be some kind of bug in the kernel relating to the counter code.  Perhaps the eth2 counter is rolling over normally, but I don't know what value it does that at, so... *shrug*

Certainly eth0 shouldn't be resetting every second though.  I noticed there seems to be no RX/TX polling option in the kernel for this driver, so that can't be causing it.

----------

