Re: unloading modules in 2.2.x kernels
Wichert Akkerman wrote:
> Previously Adrian Bridgett wrote:
>> For all you people using 2.1.x or 2.2 kernels, you will find that modules
>> are no longer automatically unloaded - you need to run "rmmod -a" to do
>> that.
>
> I was thinking of using a crontab entry to do that and run that every 5
> minutes or so. The downside of the `rmmod -a' crontab that the kernel
> documentation suggests is that modules that were not auto-loaded are
> also unloaded. That can break systems, so I will not add the crontab to
> the modutils package.
Erm, no:
# lsmod | grep joy
# modprobe joy-sidewinder
# lsmod | grep joy
joy-sidewinder 4404 0 (unused)
joystick 8932 0 [joy-sidewinder]
# rmmod -a
# lsmod | grep joy
joy-sidewinder 4404 0 (unused)
joystick 8932 0 [joy-sidewinder]
# modprobe -r joy-sidewinder
# lsmod | grep joy
# uname -a
Linux renehl 2.2.0-pre2 #1 tor dec 31 20:27:05 CET 1998 i586 unknown
Perhaps this is not clear from the rmmod man page, but modules that are
explicitly modprobe'd are *not* considered unused by rmmod -a. I don't
know about 2.0 kernels, though.
--
/'"`\ zzzZ | My PGP Public Key is available at:
( - - ) | <http://home1.inet.tele.dk/renehl/>
--oooO--(_)--Oooo------------------------------------------
Don't ya just hate it when there's not enough room to fin
Reply to: