Date: Thu, 20 Jun 2019 22:32:49 +0200 From: Marco van Tol <marco@tols.org> To: freebsd-net@freebsd.org Cc: Marco van Tol <marco@tols.org> Subject: net.inet.ip.stats - struct ipstat.ips_total - appears to be double the actual number Message-ID: <7861F570-6FD2-4BD0-B33B-D7F90BE44B77@tols.org>
next in thread | raw e-mail | index | archive | help
Hi there, I'm trying to write a patch for collectd to generate trend graphs on = ipv4 and ipv6 statistics. I use the sysctls net.inet.ip.stats and net.inet6.ip6.stats for this. The structs I use to parse these sysctls are "struct ipstat" and "struct = ip6stat". While doing this, I keep running into the fact that the "struct = ipstat.ips_total" count seems to be twice the number of ipv4 packets = that actually got received on a host. Does this make any sense at all? So, in other words, if I call "sysctls net.inet.ip.stats", and do = another call 1 second later, I can deduce a per-second incoming ipv4 = packet rate. This seems to be twice as high as actually happening. The number reported in struct ip6stat.ip6s_total seems to be correct. Is there any reason for the ips_total to be twice the number of ipv4 = packets that actually got received? Another way to witness these counts is by doing: netstat -s -p ip, and = then checkout "total packets received" on a per-second basis. Thank you very much in advance! Marco van Tol=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7861F570-6FD2-4BD0-B33B-D7F90BE44B77>