LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ulimit settings in /etc/profile (https://www.linuxquestions.org/questions/linux-newbie-8/ulimit-settings-in-etc-profile-288533/)

darn 02-10-2005 10:04 AM

ulimit settings in /etc/profile
 
I'm running Red Hat 2.4.7-10enterprise and I have replaced the standard ulimit -c setting with the following statement in /etc/profile:

$ grep ulimit /etc/profile
#ulimit -S -c 0 > /dev/null 2>&1
ulimit -c unlimited

However when I log and check the ulimit value I see it set to 4194304:

$ ulimit -a
time(seconds) 2147483647
file(blocks) 4194304
data(kbytes) 2097152
stack(kbytes) 8192
memory(kbytes) 2097152
coredump(blocks) 4194304
nofiles(descriptors) 1024
vmemory(kbytes) 2097152


my default shell is set to /bin/ksh:
$ ps
PID TTY TIME CMD
10644 pts/12 00:00:00 ksh
11280 pts/12 00:00:00 ps

Why isn't the new ulimit setting being picked up? Isn't /etc/profile read when ksh is used?

jailbait 02-10-2005 11:11 AM

"Why isn't the new ulimit setting being picked up? "

The new ulimit has been picked up. The coredump has changed from 0 to 4194304 which I suppose is the number that ulimit uses to mean unlimited. On the version of ulimit that I use it prints "unlimited" instead of the number.

core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 3968
virtual memory (kbytes, -v) unlimited

"Isn't /etc/profile read when ksh is used?"

The ulimit command is actually part of the shell. That is why your ksh formats the output from the ulimit command differently than my bash does.


----------------------------
Steve Stites


All times are GMT -5. The time now is 10:09 AM.