Re: kmod & cron-jobs

Greg Zornetzer (gaz@andrew.cmu.edu)
Fri, 20 Nov 1998 11:14:06 -0500 (EST)


On Thu, 19 Nov 1998, Mircea Damian wrote:

> On Thu, Nov 19, 1998 at 08:07:08AM +0100, Ralf Nagel wrote:
> > Hi list,
> >
> > I am currently running a 128-kernel. Kmod is active, and
> > I have set up a cron job to unload the moduls on a regular
> > base. This is a bad solution - e.g sound modules!
> > How can I test, that a module is active AND running?
> > Or should I get back to kerneld?
>
> Running rmmod -a won't remove used modules... or at least I think so!
That's correct. rmmod -a will only remove unused modules, but there's an
additional twist. It will first mark unused modules as "ready for
removal", but not remove them. A second rmmod -a pass will remove any
modules that have this tag. The advantage of this is that for modules
(like sound) that get used then released frequently will not get removed
unless they have been unused for two rmmod -a passes.
However, rmmod -a in cron isn't the greatest solution for laptops and the
like, which will have to touch the disk every time the cron job is run,
spinning up the HD. I'll try to post code that will do the equivalent of
rmmod -a, but remains running.

Greg Zornetzer - gaz+@andrew.cmu.edu
"Light shines brightest in the darkest night"
http://www.contrib.andrew.cmu.edu/~gaz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/