Hello Sean, strumm...@thestrings.com wrote: [...] > > it appears that the format of the "netstat -i" output changed in FreeBSD > 8 to include that 'Idrop' column. > > So, perhaps an easy way to fix this is to use different code to process > the output for netstat -nibd based on the version of FreeBSD used? I've > attached a patch which seems to do the trick for me. >
I've looked the patch and it seems that only covers FreeBSD version 7.x and 8.x, but I'm not sure if FreeBSD versions prior to 7 (6.x, 5.x, ...) could be also covered under the 7 condition. Also, assuming the 'Idrop' column will continue existing from now on, the next version 9 won't be covered by this patch forcing to add another patch to the code. I was thinking to use right now something like: if($kernel_branch > 7.2) { # has 'Idrop' column } else { # don't has 'Idrop' column } This will ensure that even versions prior 7 could be supported assuming they still have the same column layout as the 7 version. So they should work without any problem. Also it ensures that assuming the 'Idrop' column will exist in newer versions, they will be covered as long as the FreeBSD guys don't include an extra column. Let me know what do you think about all of this. Many thanks. -- 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