Re: [Monitorix-general] Network Traffic and Usage Problem Graph, FreeBSD

2011-03-15 Thread Jordi Sanfeliu
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


Re: [Monitorix-general] Network Traffic and Usage Problem Graph, FreeBSD

2011-03-15 Thread strumming
Hello Jordi,

Quoting Jordi Sanfeliu jo...@fibranet.cat:

 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.

Sorry, I did not take those into account as I don't have those  
versions to test so I was not sure if they include the 'Idrop' field  
in their netstat output.

As a quick note, from what I know FreeBSD always has three versions  
supported at one time, at the moment, that is 7 (legacy), 8 (standard)  
and 9 (experimental, next generation). As far as I can tell, this  
means any version older than 7 is no longer supported by security  
patches or the ports system. So I'm not sure if you want to support  
versions earlier than 7, but it is up to you. It is easy to do it in  
this case but if there are other issues with FreeBSD that are version  
dependent, it might be an issue then.

 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 makes sense. It should work for most future versions as well. I  
Should have taken that into account!

Best regards,
Sean



--
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