Interface counters netstat vs pfctl
-
I was searching around looking for a way to zero the netstat interface error counters, which would be nice if you swapped a cable or whatnot and wanted to see if there was still a problem. Couldn't find a way.
Anyway, I came across someone complaining about the 32 bit netstat traffic counters, and someone pointed out that pf uses 64 bit counters. So something like:
pfctl -vvsI -i vr1
will give you traffic stats that won't wrap at 4GB.
So, would it be feasible to query pf instead of netstat to get rid of the 4GB wrapping 'bug' on the interface counters? -
This seems quite valid, it should help for both the interfaces graph and the rrd graphs.
Which leads me to think we need a input output error graph. That we could use quite well.
I think I looked at it during one point but I am unsure if pf will reset the counters on filter reload. Easy enough to test ofcourse.
-
Looks good. I've commited support for it. Seth is adding some other touches to it as well. Thanks for the suggestion!