[SOLVED] Traffic graph weirdness
-
Oké i guess its still not 100% definitive…
Pfsense calls sysctl with:
CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, {ifidx}, IFDATA_GENERAL
Where it retrieves the data: bytes, packets, collisions, multicasts, mtu
https://github.com/pfsense/FreeBSD-ports/blob/devel/devel/php56-pfSense-module/files/pfSense.c#L3210While nload calls sysctl with:
CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0
Where it retrieves the data: bytes, packets, errors
https://github.com/liuyang1/nload/blob/master/src/devreader-bsd.cpp#L108So its similar but not the same, and that might be for a good reason. I'm not exactly sure.. Though i guess most of those extra data items are not needed for traffic graphs..
-
Jarred is on the case
Maybe just fewer flags and thats it. -
I think this is the issue jahonix was referring to: https://redmine.pfsense.org/issues/3314
If that's the case someone else might pick up the ticket, but for now I'll try and find the commit with the patch.
edit: I tried running:
git log --since "MAY 18 2015" --until "MAY 20 2015" --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"
on the following repos:
pfsense/pfsense pfsense/FreeBSD-ports pfsense/FreeBSD-src
without any luck finding the patch so far. I may have accidentally missed it or be taking the wrong approach.
-
Found it: https://github.com/pfsense/pfsense-tools/commit/ad55e66a3fb817f8e54bae7bf38306039b82e3ad
Or: https://github.com/pfsense/FreeBSD-src/commit/939f11b196e7d22a1ce3da8533e97ff3e92510b6#diff-437f2b0c100f75faf75f7c5b60eca6a4R1156
-
2.3:
ifp->if_opackets++; //ifp->if_omcasts += mcast; //ifp->if_obytes += len;
2.4:
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, len); if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast);
In 2.4 it looks different.. probably needs some // as well.. https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_4/sys/net/if_vlan.c#L1132
-
I love this kind of collaboration, really great!
-
Nice work PiBa! And thanks for the lead jahonix!
I updated the ticket with the new info: https://redmine.pfsense.org/issues/7751
-
Thanks guys!
This us why I prefer pfsense to other fw's… ;) -
@jared: I didn't do a thing despite remembering that I had this problem in the past myself.
And someone gave me a smite for it anyways. ;-)I'd love to contribute more actively but my programming abilities are elsewhere (Crestron mainly).
-
Resolved with todays snap!
Thanks guys!
-
Hi
My Lan is a parent interface of 2 Vlan's. When someone transfere something from internet on one of the Vlan's interface the Lan interface have the same bandwidth usage (if no one use Lan otherwise it sum the bandwidth). Ideally, in my case, should be the bandwidth used in Vlan not sum in the Parent interface.
Some stuff i can point is the rule from Vlan to internet have a limiter.
The double bandwidth is solved in Vlan's interfaces.