1848097 Members
5553 Online
104022 Solutions
New Discussion

Re: ulimit

 
Leonid Mishkind
Frequent Advisor

ulimit

Hi to all.
I have a problem setting up a soft data value with ulimit.
here is some outputs:
root@pet3: ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194300
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 1024
root@pet3:

root@pet3: ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 3802048
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 1024
root@pet3:

root@pet3: kmtune -q maxdsiz
Parameter Current Dyn Planned Module Version
===============================================================================
maxdsiz 4294963200 - 4294963200
root@pet3:
root@pet3: ulimit -Sd 4194300
sh: ulimit: The specified value exceeds the user's allowable limit.

Why cant I increase the value?



9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: ulimit

Shalom,

ulimit values in /etc/profile limit what can be done with an individual user can do. You may need to change it for the system and then try again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Leonid Mishkind
Frequent Advisor

Re: ulimit

Shalom SAP. I cant find ulimit commands in my /etc/profile.
Also, what should be defined in the profile so that I could not change the ulimit value?
whiteknight
Honored Contributor

Re: ulimit

Hi,

Make sure you are using posix shell.
The minimum, maximum, and default ulimit values are based on certain
kernel parameters.

For the Korn shell (ksh), ulimit only affects the filesize limit
which defaults to 4194304, and this is the ksh value for unlimited.

For the POSIX shell (sh), there are several variables that can be set
with ulimit. The ulimit -a command lists the variables that can be
set for the posix shell.

Note: See the sh-posix(1) man page. There are soft and hard
limits for these variables.

Soft Limit:
-----------

$ ulimit -aS
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 65536 max determined by maxdsiz
stack(kbytes) 8192 max determined by maxssiz
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 60 max determined by maxfiles

Hard Limit:
-----------

$ ulimit -aH
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 65536
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 1024 max determined by maxfiles_lim

The C shell (csh) has similar variables. These variables are set by
the csh limit command.

Problem never ends, you must know how to fix it
Leonid Mishkind
Frequent Advisor

Re: ulimit

The problem is I cant change my data value to match the maxdsiz value ... You can see the outputs above
whiteknight
Honored Contributor

Re: ulimit

hi leonid,

Please install this patch

PHCO_36145 11.11 cumulative sh-posix(1) patch

( SR:8606312643 CR:JAGae75459 )
When the kernel tunable - maxdsiz is set to a value
greater than 0x7fffffff, the sh-posix(1) built-in ulimit, displays incorrect results.

Hope this help
Problem never ends, you must know how to fix it
Dennis Handly
Acclaimed Contributor

Re: ulimit

>Why cant I increase the value?

You can never increase the value, unless you just decreased it. But it seems your soft is less than the hard.

Also, I have never had any luck with using -S or -H when I try to set a value.

>whiteknight: Make sure you are using posix shell.

No need, ksh supports it on 11.11, at least it is documented there in Sept 2005.
whiteknight
Honored Contributor

Re: ulimit

Denis,

Thanks for pointing out :-)
Problem never ends, you must know how to fix it
Leonid Mishkind
Frequent Advisor

Re: ulimit

Thanks people. Unfortunately nothing help.
HP Support is now connected to my server trying to locate the problem ( The patch did not help either ).
I will post an update as soon as I have a solution for future generations :)

Regards,
Leonid.
Dennis Handly
Acclaimed Contributor

Re: ulimit

>Unfortunately nothing help.

What are you really trying to do?
Assuming your ulimit display is bogus, can you still malloc your 4 Gb? (Note you have to work real hard to get 4 Gb in a 32 bit application.

>whiteknight: Make sure you are using posix shell.

ksh supports it on 11.00 too.