netstat -i Ierrs column, Is it total, or per second?

Andrew Brampton brampton+freebsd-hackers at gmail.com
Mon Aug 31 10:18:58 UTC 2009


Hi FreeBSD-Hackers,

netstat -i will print out statistics for each interface, including
input/output packets, input/output bytes, and input/output errors. Now
packets and bytes columns seem to be absolute counts, whereas the
errors column seems to be a count over the last second. For example,
when I am filling a link (and then stop), I get output like so:

Name    Mtu Network       Address              Ipkts Ierrs    Opkts Oerrs  Coll
ix0    9000 <Link#4>      00:1b:21:20:f9:07 12687951213 432913
1     0     0
<wait a second>
ix0    9000 <Link#4>      00:1b:21:20:f9:07 12691545431 435439
1     0     0
<wait a second>
ix0    9000 <Link#4>      00:1b:21:20:f9:07 12692054413 434735
1     0     0
<wait a second and traffic has stopped>
ix0    9000 <Link#4>      00:1b:21:20:f9:07 12696499228 300785
1     0     0
<wait a second>
ix0    9000 <Link#4>      00:1b:21:20:f9:07 12696499228     0        1
    0     0

As you can see the "Ipkts" value continues to rise, but the "Ierrs"
goes up and down, eventually falling to zero. So my question is,
should this "Ierrs" count be per second?, if so how can I change this
behaviour. I looked at the source code for the driver (ixgbe) and the
OS, looking for every reference to ifp->if_ierrors, but I didn't find
anything that reset this value over time. I also tried a similar
experiment with the e1000 driver but I couldn't get that interface to
list any errors.

I'm running these tests on FreeBSD 8.0-Beta3, but I observed the same
behaviour on FreeBSD 7.2.

Thanks
Andrew


More information about the freebsd-hackers mailing list