LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   trying to unload unnecessary kernel modules (https://www.linuxquestions.org/questions/linux-kernel-70/trying-to-unload-unnecessary-kernel-modules-444346/)

biophysics 05-13-2006 04:20 AM

trying to unload unnecessary kernel modules
 
Dear Gurus

I remember reading elsewhere that unloading unnecessary kernel modules will help in increasing laptop battery life. Any ideas how to determine which are the unnecesary modules.

Is unloading a module under use crash the system?

Any pointers greatly appreciated...

the_unforgiven 05-13-2006 08:30 AM

The unnecessary modules would report the module usage count of 0 in the output of "lsmod" or "cat /proc/modules".
However, if the module is not coded properly, this might be a false value and the module might actually be in use while reporting the module usage count of 0. So, unless you're absolutely sure of it, don't remove arbitrary modules as it MAY crash the system. You've been warned !!!! ;)

b0nd 05-13-2006 09:51 PM

Quote:

Originally Posted by the_unforgiven
So, unless you're absolutely sure of it, don't remove arbitrary modules as it MAY crash the system. You've been warned !!!! ;)

Hi,
but won't it be a temporary crash ???
reboot the machine in safe mode and re-insert that particular module using
#insmod
or
#modprobe

regards

the_unforgiven 05-14-2006 03:21 AM

Quote:

Originally Posted by ruudra
Hi,
but won't it be a temporary crash ???
reboot the machine in safe mode and re-insert that particular module using
#insmod
or
#modprobe

regards

Yes, it will be a temporary crash..

But generally, linux is known for its stability - no frequent reboots - even after installing a piece of s/w unlike the big OS from Redmond.
Besides, if you were to try it on a shared/production server, it might not be feasible to reboot it.

As far as just testing and understanding goes, almost anything is ok ;)

kevkim55 05-14-2006 04:21 AM

Quote:

Is unloading a module under use crash the system?
The command to unload module is rmmod. rmmod won't let you unload the modules in use unless you supply it with -f command line argument which would force unload the modules. Ofcourse, this force unloading should be enabled in the kernel config.


All times are GMT -5. The time now is 08:52 AM.