1851270 Members
3426 Online
104057 Solutions
New Discussion

Ulimit restriction

 
gibily
Occasional Advisor

Ulimit restriction

Hi, on HP-UX 11 Itry to increase the ulimit file's value (for the Oracle user) like "ulimit -f unlimited" but we get the following error /usr/bin/sh: ulimit: The specified value exceeds the user's allowable limit. This user uses the POSIX shell (sh) and by default the ulimit file's value is set to 2113674.
I checked /etc/profile and there is no restriction.
My question is, how can I increase this value ?
Thanks.
10 REPLIES 10
federico_3
Honored Contributor

Re: Ulimit restriction

modify the /var/adm/cron/.proto like the following:

cd $d
if [ "$1"= "4194304"]; then
ulimit unlimited
echo was number
else
ulimit $1
echo was unlimited
fi
ulimit
umask $m
$<



Ciao
Federico

gibily
Occasional Advisor

Re: Ulimit restriction

Thanks federico,
but I don't use the cron to run my scripts.
Anyway I changed the script as you said, but it still doesn't work.
New idea ?
Michael Tully
Honored Contributor

Re: Ulimit restriction

Hi,

ulimit has only got variables when used in conjunction with the posix shell. No other shell has options for posix. Have a look at the man page for sh-posix.

HTH
-Michael
Anyone for a Mutiny ?
gibily
Occasional Advisor

Re: Ulimit restriction

Hi Michael, I also tried with ksh, (the limit is set to 2113674), when I want to increase it by typing, ulimit 2200000 I receive the message : ksh: ulimit: bad number
There is somewhere a limit set, but where ?
S.K. Chan
Honored Contributor

Re: Ulimit restriction

Did you check the user's .profile ?
K.Vijayaragavan.
Respected Contributor

Re: Ulimit restriction

How about adjusting the values of below mentioned configurable files parameters (kernel parameters) in sam?

1)maxfiles_lim
2)maxfiles
3)nfile
4)nflocks
5)ninode

-K.Vijay
"Let us fine tune our knowledge together"
Steven Sim Kok Leong
Honored Contributor

Re: Ulimit restriction

Hi,

What is your maxdsiz btw?

Hope this helps. Regards.

Steven Sim Kok Leong
gibily
Occasional Advisor

Re: Ulimit restriction

Yes, I checked the user's .profile, and there is nothing set. I also checked the kernel parameters as you said,
1)maxfiles_lim 2048
2)maxfiles 2048
3)nfile 12008
4)nflocks 664
5)ninode 7360
maxdsiz 1073741824
maxdsiz_64bits 1073741824

By the way, we have another server with the same kernel's parameters, and we don't have this problem ?
It seems that it has something to do with the shell, but on all our HP systems we use sh-posix and the ulimit value is set to unlimited by default. But I don't know here this default value is set ?
K.Vijayaragavan.
Respected Contributor

Re: Ulimit restriction

Hi,

"find / -type f | xargs grep ulimit | pg"

command should help you in finding where all the files "ulimit" command is used.

-K.Vijay
"Let us fine tune our knowledge together"
Zeev Schultz
Honored Contributor

Re: Ulimit restriction

Actually ulimit has two kinds - hard and soft,
(sh-posix(1) man) and the difference is that
hard limit can not be increased once it's been
set but soft can.What happens is if you do not specify which limit you change (soft or hard ) with -H/-S flags after "ulimit" command,it changes both and afterthat impossible to change soft "-f" value.
What can be done is to leave the current shell,
relogin,check with "ulimit -fH","ulimit -fS" ulimit -fS can go up to ulimit -fH and change
as needed.

So computers don't think yet. At least not chess computers. - Seymour Cray