LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I know wich modules I can unload. (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-know-wich-modules-i-can-unload-343117/)

Palula 07-14-2005 08:33 AM

How do I know wich modules I can unload.
 
Hi there!

I use linux for about 4 months now and this question has always intrigued me. The thing is: a have a Pentium II CPU that is being configured to work as a Router/Firewall. Itīs not properly configured yet. I started the Firewall script yesterday (Iīm very new to this).

Well, the main thing is that when I type lsmod, a whole page of modules is showed on screen and I bet that a lot of these modules can be supressed. For example, my sound modules. They can all be unloaded (rmmod) or supressed at boot time. I do have an onboard soundcard but I donīt intend to use it. Another thread on this site helped me to find out how to unload modules at boot time (I was looking for /etc/modules.conf, and in FC3 the archive is /etc/modprobe.conf).

The information I am really looking forward to know is how do I know the importance of a loaded module. How do I know (based on what I intend to do with the machine) wich modules are indifferent to my needs, so that I can unload them.

Thanks a lot!
Palula Brasil.

trickykid 07-14-2005 09:14 AM

All depends on your hardware. Also when doing an lsmod, it tells you if the module is being used or not, that should give you a notion of what you can remove and what you should keep.

Palula 07-14-2005 11:31 AM

"Used By"
 
First of all thank you trickykid.

I found the Used By column, but it looks really weird...
In the list of all modules (lsmod), I have two modules running. One for the eth0 (3c59x) and one for the eth1 (rtl8139xxx). Itīs obvious that they are being used isnīt it?

On the used by column, appears: 0 and no other module is using it. Thatīs fine with me probably there really isnīt any module using it. But according to that judgement, if I for example weīre dumb enough to unload these two modules based on the "0" and no arguments after the "0", I would be unloading my two NICīs. And that doesnīt seem right to mee...

So is that fair enough or is there more information than meets the eye?
How should I interpret the information in that column?

Thank in advance! :-)
Palula Brasil.

trickykid 07-14-2005 11:52 AM

Can you paste the output of "lsmod" here in code tags?

Palula 07-15-2005 10:11 AM

Here it is.

Code:

Module                  Size  Used by
vfat                  14657  1
fat                    46177  1 vfat
sermouse                4929  0
md5                    4033  1
ipv6                  234753  8
parport_pc            24577  1
lp                    12077  0
parport                42121  2 parport_pc,lp,
autofs4                24389  0
sunrpc                160933  1
dm_mod                54869  0
ns558                  5441  0
gameport                4801  1 ns558
snd_cmi8330            12041  0
snd_sb16_dsp          14913  1 snd_cmi8330
snd_ad1848_lib        22081  1 snd_cmi8330
snd_pcm_oss            49017  0
snd_mixer_oss          17985  1 snd_pcm_oss
snd_pcm              100041  4 snd_cmi8330,snd_sb16_dsp,snd_ad1848_lib,snd_pcm_oss
snd_timer              30661  1 snd_pcm
snd_page_alloc          9673  1 snd_pcm
snd_sb_common          18369  2 snd_cmi8330,snd_sb16_dsp
snd                    55589  8 snd_cmi8330, snd_sb16_dsp, snd_ad1848_lib, snd_pcm_oss, snd_mixer_oss, snd_pcm, snd_timer, snd_sb_common
soundcore              9889  1 snd
8139too                26305  0
mii                    4673  1 8139too
3c59x                  36457  0
floppy                59249  1
ext3                  116809  2
jbd                    74969  1 ext3

By the way, I altered my modprobe.conf, commenting all the lines that donīt contain my NICīs and that disnīt change a thing. Can you guys help me with that too?

Here is the modprobe.conf file:

Code:

alias eth0 3c59x
alias eth1 8139too
alias snd-card-0 snd-cmi8330
options snd-card-0 index=0
install snd-cmi8330 /sbin/modprobe --ignore-install snd-cmi8330 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-cmi8330 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-cmi8330

Every line reffering to souncards were commented. The only lines I left uncommented were the fist two lines. However, that didnīt work.

Palula 07-19-2005 07:47 PM

Please!!!
Can anyone help?! :-)


All times are GMT -5. The time now is 07:56 PM.