Message: previous - next
Month: April 2012

Re: [trinity-devel] knemo - patch to change default backend from 'Nettools' to 'Sys'

From: "Timothy Pearson" <kb9vqf@...>
Date: Wed, 18 Apr 2012 02:35:35 -0500
> All,
>   I'm trying to patch knemo to initialize with the Sys backend (as
> default) for
> the package. You have the option to set Nettools or Sys (kernel) providing
> network information to the monitor. Sys is much more efficient than
> Nettools,
> but only works for kernels >= 2.6 (which is everybody now). I wouldn't
> care or
> go to the effort is the Nettools backend still worked, but as of the Linux
> 3.0/3.1 kernels, (as well as later 2.6.X kernels) Nettools doesn't seem to
> work
> forcing the user to find and set the obscure setting to Sys before the
> module
> will work at all. I propose we make 'Sys' the default backend in TDE.
>   Hunting and picking through the code, I have found where the default
> values
> are set for the backend as well as the colors for the plotter graph. There
> were
> a couple of structs and constructors involved depending on how knemo was
> launched. I have created a patch that does both (1) set the default
> backend to
> sys and (2) change the graph colors a bit so it is readable regardless of
> whether there is a dark/light background shown.
>   Here is the patch, look it over, engage in discourse and if the yays are
> greater than the nays --> push it :) (works with gcc47 too :)
> --
> David C. Rankin, J.D.,P.E.

Looks reasonable to me.  As an aside I am fairly certain that Ubuntu
patched sys to be the default backend some time ago, and we should
probably just remove the nettools backend code entirely.

Long term it would be interesting to hook knemo into the TDE hardware
library (which already monitors statistics via sysfs) to reduce code