Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 have a linux 7.1 kernel 2.4.2-2 machine and i must change the values of certain kernel variables. I have modified the values of some variables that are in the following files:
/usr/src/linux/include/asm/shmparam.h
/usr/src/linux/include/linux/sem.h
/usr/src/linux/include/linux/msg.h
but i don't know what to do in order to have these changes taken into account by the system? Is it absolutely necessary to recompile the kernel (I'd rather not to...)?
If you make change in these header files, you need to recompile your kernel... A way not to recompile it is to check wether you can make these changes thanks to /proc directory...
What do you mean by "make these changes thanks to /proc directory?" I don't understand, sorry. Are there any special files that i must modify in the /proc directory?
Compiling the kernel is not a big deal. Changing variables, however, might lead to unexpected results. You would have to compile the kernel to make any changes have any effect.
That kernel is also fairly old. You should d/l a more recent kernel, like 2.4.27
Well, /proc directory contains some file that can dynamically modify kernel behaviour (and other files that show system info). For example:
Code:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
will disable ICMP_ECHO_REPLY, so you'll not respond to ping anymore...
So have a look in /proc/sys/kernel/ ... You may find interesting file. The only problem is to know/find what to put in which file.
Thank you, it seems more clear now but I still have questions.
The variables I am looking for are:
msgmap,
msgmax,
msgmnb,
msgseg,
msgssz,
msgtql,
semmap,
semmni,
semmns,
semmsl,
shmmni,
shmmax.
I found files (that contain values) for msgmax, msgmnb, msgmni, shmmni, shmmax in the /proc/sys/kernel directory but I can't find any file for the other variables. Does that mean that the kernel uses default values for them? If yes, is there a way to know these values and if necessary to modify them?
Does that mean that the kernel uses default values for them?
I think yes... but be careful, for example /proc/sys/kernel/sem file contains 4 values. For other values, if you really need to change them, I think that you have to modify kernel source code and so recompile kernel. But don't worry, kernel recompilation is quite simple
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.