Re: setting ulimit values while user account shell is csh (1802 Views)
Reply
Occasional Visitor
Erin Lehaney
Posts: 2
Registered: ‎12-22-2004
Message 1 of 3 (1,804 Views)
Accepted Solution

setting ulimit values while user account shell is csh

I have a user account that is utilizing shell /bin/csh and I am trying to figure out how to setup the necessary resource limit values for the account. Here are my current values...

ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 16777216
stack(kbytes) 8192
memory(kbytes) 6113480
coredump(blocks) 0
nofiles(descriptors) 4096
vmemory(kbytes) 134217728

The vendor would like to have the'coredump' size set to unlimited but when I attempt to set the value using "ulimit -c unlimited" it will not set the value. The value continues to return 0. What is the proper method for setting ulimits for accounts? Let me know if any other details are necessary for this inquiry and I'll be happy to provide. Also, the vendor explained we can perform 'limit -h' and get the current coredump size also, however when I perform that command, I am presented with different values as shown below...

limit -h
cputime unlimited
filesize unlimited
datasize 16777216 kbytes
stacksize 32768 kbytes
coredumpsize unlimited
memoryuse 6113480 kbytes
descriptors 4096 files
addressspace 134217728 kbytes

what are the differences between 'ulimit' and 'limit'. Thanks in advance! anyone who can point me to a great explaination of ulimits would be greatly appreciated!
Honored Contributor
Steven Schweda
Posts: 9,089
Registered: ‎02-23-2005
Message 2 of 3 (1,802 Views)

Re: setting ulimit values while user account shell is csh

The "ulimit" and "limit" commands are often
built into the shell. For example:

urtx> /usr/local/bin/bash
urtx> type ulimit
ulimit is a shell builtin

urtx> /bin/sh
urtx> type ulimit
ulimit is a shell builtin

urtx> /bin/csh
% which limit
builtin/limit

When one of these is a shell built-in, you
may not get much useful from running some
external program with the same (or a similar)
name. ("cat /usr/bin/ulimit", for example.)
Also, the syntax may be different for each of
these things.

In a C shell, I'd suggest using "limit":

% limit
cputime unlimited
filesize unlimited
datasize 1048576 kbytes
stacksize 8192 kbytes
coredumpsize unlimited
memoryuse 2024568 kbytes
descriptors 4096 files
addressspace 4194304 kbytes

% limit coredumpsize 1000000

% limit
cputime unlimited
filesize unlimited
datasize 1048576 kbytes
stacksize 8192 kbytes
coredumpsize 1000000 kbytes
memoryuse 2024568 kbytes
descriptors 4096 files
addressspace 4194304 kbytes

To learn more about these shell built-ins you
can do "man bash", "man csh", "man sh", or
"man ".
Occasional Visitor
Erin Lehaney
Posts: 2
Registered: ‎12-22-2004
Message 3 of 3 (1,802 Views)

Re: setting ulimit values while user account shell is csh

Thanks Steven for your reply, much appreciated. The command 'limit coredumpsize unlimited' is what I was looking for. I actually got a reply from the vendor yesterday regarding the use of the limit command as well. That appears to be the way to do it in a C shell. I have then taken the command and added it to the .cshrc script file so that any time the user account attempts to logon it will set this parameter. Next, we'll have to take the application down to restart the processes so they have the new settings. Thanks again for your information, it was helpful to understand.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.