Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I do not need all of them (for example, iptables...this machine is already behind a firewall) What other modules could I remove? I need the scsi since the backup system is scsi based.
rmmod <module_name> to remove a specific module.
modprobe -r <module_name> to remove and clean up dependencies.
modprobe <module_name> will install the module and any
modules upon which that module depends.
insmod -f <module_name> to force a module to install inspite
of warnings.
Any module can be removed, as long as it is not being used.
For example, your 3x59x module is for a 3COM ethernet card,
you can't remove that module until you bring down that
interface (likely eth0), with "ifconfig eth0 down". And conversely,
you can't bring up the interface until you've loaded the module.
Also, depending on your kernel options, you may be loading
and unloading modules automatically via kmod, et al.
The 3rd parm in the line show the current process use counter. Zero means no process is currently using the module. So look for lines with 3rd parm=0.
You'll find lines with 'autoclean' comment. This modules can be safely removed. But anyway they will be removed by system in any case (like memory shortage etc). So there is no sense to do it.
You'll find also 'unused' comment. This modules can be safely removed also. The difference is that they not be automatically removed like in case of 'autoclean'. So it makes sense to do it manually if they are not needed.
Thanks guys for your input on this issue.
So what modules do you think I should remove, without hosing my system?
I do not need the ip_tables stuff, as this server is already behind two firewalls.
bbeers mentioned something that I think I need to look into, and that is that my kernel may be loading modules automatically via kmod...whats the best way to sort out that?
Well, it would be better to prevent the unnecessary modules from loading based on knowing what you want, rather than guessing which are not needed after they've been loaded. Go through the init sequence (rc.S, etc.)
and see what is being called. Don't start any services or load any modules that you don't need. You'll have to decide what is the function of the box. Which distribution is installed, what does the box do? You already said it is not a firewall. Do you _need_ USB keyboard/mouse? Do you _need_ video? Do you _need_ samba, ext3, sound, etc. etc.?
But having said all that, why worry? Is it working? Do you _need_ to free up some resources? If it isn't broken ...
But having said all that, why worry? Is it working? Do you _need_ to free up some resources? If it isn't broken
Actually, I do need to free up some resources. This particular server is running a basic samba server, but it is also functioning as our backup server as well. It backs up our main server to a 5 tape autoloader every night.
What caught my attention is that doing some initial testing on backups, I checked it one morning and it told me it was out of memory and that I needed to remove some modules to free up memory..
I was not happy and I am in the process of chatting with the vendor as to why this happened. In the mean time, I figured it would be a wise move to see what modules I would and would not need. Plus, it's another aspect of learning all together...
But for now, I guess I need to have this particular server boot up with only what is needed. I will need to sit down and decide what things I will need, but for now, I would like to at least understand how to remove modules, insert, etc.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,302
Rep:
those modules are using very little memory.
you just need more swap. your tape program may be
writing a crapload of stuff into memory and not swapping
it out.
make a backup of your modules
tar clfvz - /lib/modules > /modulesbackup.tgz
then you can move or rename any you don't want to load,
if you can't find in the scripts where they are loading.
but that wont make much difference as far as memory
usage, and the kernel will probably remove them from
memory after a while anyway.
you can have your backup process create and add a
swapfile too, with something similar to
dd if=/dev/zero of=swapfile bs=1M count=1000
mkswap swapfile
swapon swapfile
then at the end of the script
swapoff swapfile
rm swapfile
As it is right now, the system has 512 SWAP, but it has 512MB RAM. The original admin who set it up, originally set it up with 256mb physical RAM, then decided to upgrade it to 512mb RAM.
So what I need to do is increase the swap size. Anyone have any suggestions on the best way to go about doing this?
Granted, I need to be extremely careful when doing this so I dont botch the server.
Any suggestions on how to convert the swap space from 512mb to 1024mb, without reinstalling?
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,302
Rep:
you can have several swap partitions and files.
if you don't have free unpartitioned space, the easiest
thing would be a swap file, but it looks like that one app
is the only thing that needs it.
you can have several swap partitions and files. if you don't have free unpartitioned space, the easiest
thing would be a swap file, but it looks like that one app
is the only thing that needs it.
Yes. As it is at the moment, I am pretty tight on space on the HD.
Do you recommend setting up the swap file that was suggested in this thread? Any other suggestions/modifiations I can do to get this server "out of the loop" sort a speak.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.