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 like to raise my open files limit. this can be done in /etc/security/limits.conf.
when i start my script from the command line, (my script reads the ulimit -n from the system), then, it reads the new open files limit from limits.conf correct.
but when i run the same script in the crontab, it reads the default value of "max. open files" => 1024
i know, that crontabs don't load system config files. normally i use the command "source" to load a specific config file, but that doesn't work for the file limits.conf. the error i get is this one:
# source /etc/security/limits.conf
-bash: root: command not found
-bash: root: command not found
-bash: myuser: command not found
-bash: myuser: command not found
does somebody know how crontab can interpretate limits.conf correct?
I don't know then: when I type "ulimit" at the command prompt, it gives me "unlimited", and as far as I could see it is set in .bashrc as I mentioned above.
I don't know then: when I type "ulimit" at the command prompt, it gives me "unlimited", and as far as I could see it is set in .bashrc as I mentioned above.
i don't know what kind of settings are read by typing "ulimit" at the command prompt. to read the "file max open limit", you have to type "ulimit -n" ;-)
the problem was, that the system config of a "normal" user can't be read by a "normal" users crontab.
Now, i ran the crontab as user root, and added an "su [user] -c" in the front of each command, which means that the command will be executed as [user].
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.