Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
This may look like newbie question. But I've asked many folk, but couldn't get an answer.
The problem: We have several servers running exact same version of OS (Centos 5.5) and same version of bash. However, there is one server having different ulimit values than rest. It is set with around 500M of virtual memory ulimit. Below is the output.
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 168064
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 524288
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) 524288
file locks (-x) unlimited
I checked in .bashrc, .bash_profile, bashrc, profile, profile.d/*, limits.conf, rc.local, but there is no where I could find this virtual memory of 500M. (On rest of the servers as well, unlimited virtual memory is defined no wehre). Where does this default value come from. How can I change the default. I know I can anytime override it via any of above files, but where is this default set.
Once again, this is not a newbie question and above link does not answer my question.. As I already said, all possibilities about .bashrc, .bash_profile and so on are ruled out..
I know how can I override that value, just want to know why do I have to override it on one server, if other servers are running fine with their defaults..
Has this question been answered?
I cannot seem to find this anywhere.
I was wondering where does Linux set the default ulimit settings.
The /etc/security/limits.conf will overwrite the defaults, but I cannot find where those default settings are located.
Are they set in the Kernel?
I have checked that file, and I do not see the default settings.
I currently have one user with ulimits defined in that file.
When I check the ulimit values of other user, they are different.
Therefore, there must me a different location where they are defined (could it be in the kernel?).
You're right; could have sworn that was it....
I'm sure I've seen a file somewhere that does have all the default settings... maybe Solaris.
Anyway, having googled around and looked at man pages, it (unfortunately) looks like they are set in various places eg kernel modules etc and some conf files.
I'll try to check back later to see if anyone has a definitive / better answer
I'm running on Oracle Linux 5 (a flavor of RHEL5), and am noticing the values in /etc/security/limits.conf is not working...
Here is what is in my file:
* - core unlimited
Answered by own question: Its being overridden/set in /etc/profile to 0, so add the above entry to /etc/security/limits.conf
and comment out the setting in /etc/profile and it works (for all users including root).
Thought I'd still post, since it may help someone else
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.