[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: does this LKM exist?



On Fri, Feb 15, 2002 at 10:42:36PM -0500, Patrick Boe wrote:
> hi all,
> 
> I'm about to develop a loadable kernel module, but first I want to make
> sure it doesn't already exist.  Anyone know of something that already does
> this?
> 
> I want an LKM that will use kernel timers to periodically run a function
> within the kernel.  The user specifies the function to the module at
> compile time.  So when the module is loaded, the kernel will run the
> function periodically, and when the module is not loaded, the kernel will
> not run the function.
> 
> I know this sounds kind of boring, but it would be useful to me in my
> present situation; I'm trying to collect periodic snapshots of kernel data
> that don't seem to be available from any system calls.  It looks like I'm
> going to have to alter the kernel itself or make a module, and the module
> would be nicer since I don't really want to collect data constantly.  If I
> can save other researchers the time it takes to learn how to make an LKM,
> it might be worth me learning.
> 
> this post may betray the fact that I have a lot to learn.  thoughts?

*Warning: I'm a kernel-newbie myself. Add salt as necessary*

What sort of kernel data do you want? Ultimately, it is alreay exposed
through /proc/kcore (I presume), but that's probably not the way you
want to access the data.

A couple of thoughts:

- A general rule seems to be to keep as little as possible in kernel
  space. Less code => More reliable. Can the scheduling be done in user
  space by a daemon? Cron ?

- You don't mention what sort of data you want. But chances are that if
  you want to get to it, so does somebody else. But unless we know what
  data you're after, nobody else will shout "mee too".

Just my 2p...
-- 
 ______________________________________________________________
/\                                                             \
\_| *DISCLAIMER* I do not know exactly what I'm talking about. |
  | Large grains of salt recommended to aid in digestion.      |
  |   _________________________________________________________|_
   \_/___________________________________________________________/



Reply to: