Operating System - Tru64 Unix
1753297 Members
6563 Online
108792 Solutions
New Discussion юеВ

Re: setting ulimit values while user account shell is csh

 
SOLVED
Go to solution
Erin Lehaney
New Member

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!
2 REPLIES 2
Steven Schweda
Honored Contributor
Solution

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 ".
Erin Lehaney
New Member

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.