Hello Sean, Many thanks for using Monitorix and for your kind words about it.
Well, I think we have a problem of FreeBSD versions here. Let me show what I get issuing the same command as you: $ netstat -nibd Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll Drop le0 1500 <Link#1> 00:0c:29:10:ca:16 5985 0 822418 5321 0 3729407 0 0 le0 1500 192.168.1.0/2 192.168.1.162 5686 - 724874 5021 - 3646513 - - plip0 1500 <Link#2> 0 0 0 0 0 0 0 0 lo0 16384 <Link#3> 6722 0 711434 6722 0 711434 0 0 lo0 16384 fe80:3::1/64 fe80:3::1 0 - 0 0 - 0 - - lo0 16384 ::1/128 ::1 44 - 4724 44 - 4724 - - lo0 16384 127.0.0.0/8 127.0.0.1 6678 - 706710 6678 - 706710 - - As you can see I don't have the 'Idrop' column in my output, and that's probably is the definitive cause of the problem. I'm not an expert on FreeBSD, well I'm not even an advanced user, so perhaps I didn't get the right version of FreeBSD for my testing purposes. This is the version I have used: $ uname -a FreeBSD freebsd.fibranet.lan 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 r...@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Please, let me know which you think would be the right steps to fix this situation. Many thanks. Best regards. strumm...@thestrings.com wrote: > Hello, > > First, thank you for creating monitorix. I've used to it monitor several > CentOS servers I administered for a few years and it has proved to be > very useful. > > I have no idea if I this is the right way to report a bug so my > apologies if this is the wrong way to go about doing it. > > I also happen to administer some FreeBSD systems. I recently found what > I think is a bug in the code for collecting network statistics under > FreeBSD. I noticed that the main graph in the Network Traffic and Usage > graph section is always blank. No traffic is ever logged. However, the > traffic error section always logs data as if my network interface is > continually generating packet errors. > > I believe I have found the cause of the problem and enclose a patch for it. > > I think some of the columns from netstat -nibd are being logged in the > wrong order - > > open(IN, "netstat -nibd |"); > > while(<IN>) { > if(/Link/ && /$NET_LIST[$n]/) { > (undef, undef, undef, undef, $net_packs_in[$n], > $net_error_in[$n], $net_bytes_in[$n], $net_packs_out[$n], > $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_); > } > } > > compare this with the actual output of a netstat -nibd command : > > Name Mtu Network Address Ipkts Ierrs Idrop > Ibytes Opkts Oerrs Obytes Coll Drop > ipfw0 65536 <Link#1> 0 0 0 > 0 0 0 0 0 0 > lo0 16384 <Link#2> 0 0 0 > 0 0 0 0 0 0 > lo0 16384 fe80:2::1/64 fe80:2::1 0 - - > 0 0 - 0 - - > lo0 16384 ::1/128 ::1 0 - - > 0 0 - 0 - - > lo0 16384 127.0.0.0/8 127.0.0.1 0 - - > 0 0 - 0 - - > em0 1500 <Link#3> 08:00:27:09:3e:7c 30976 0 0 > 43684172 21128 0 1183551 0 0 > em0 1500 192.168.10.0/24 192.168.10.15 30970 - - > 43248731 21126 - 887703 - - > > $net_packs_in[$n] = Ipkts (correct) > $net_packs_error_in[$n] = Ierrs (correct) > $net_bytes_in[$n] = Idrop (should be Ibytes, next column) > $net_packs_out[$n] = Ibytes (should be Opkts, next column) > .... > etc > > The solution is to add one more "undef" after $net_error_in[$n] thus : > > if(/Link/ && /$NET_LIST[$n]/) { > (undef, undef, undef, undef, $net_packs_in[$n], > $net_error_in[$n], undef, $net_bytes_in[$n], $net_packs_out[$n], > $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_); > } > > I first noticed this on version 1.5.1 (FreeBSD ports) and it still > appears to be there in v. 2.0.0 and 2.1.0 (source), which I am now running. > > Best regards, > Sean > -- Jordi Sanfeliu FIBRANET Network Services Provider http://www.fibranet.cat ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Monitorix-general mailing list Monitorix-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monitorix-general