Operating System - HP-UX
1752756 Members
4778 Online
108789 Solutions
New Discussion юеВ

Re: How to change the ulimit values in HPUX

 
SOLVED
Go to solution
Kadavan
Occasional Advisor

How to change the ulimit values in HPUX

Hi

Can you please let me know how to change the ulimit values is HPUX .My present values is

cphpqp16:/users/root # ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2015464
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 4096

I need to change the stack value to 16 MB

Regards
-Binu
4 REPLIES 4
Shibin_2
Honored Contributor

Re: How to change the ulimit values in HPUX

If you want to change it for all users, do it in /etc/profile.

If you want to do particular user, use the respective options with ulimit.

e.g ulimit -c to set core file size.

Read man pages of ulimit to get more details.
# man ulimit.

1. ulimit -a
Display all configured values.
2. ulimit -c
Sets core file size
3. ulimit -d
Sets data seg size
4. ulimit -n
Sets Open Files
5. ulimit -s
Sets stack size
6. ulimit -u
Sets max user processes
7. ulimit -t
Sets cpu time
8. ulimit -v
Sets virtual memory
9. ulimit -p
Sets pipe size
Regards
Shibin
Kadavan
Occasional Advisor

Re: How to change the ulimit values in HPUX

I am getting the following error while doing a ulimit


phpqp16:/users/root # ulimit -s 16384
sh: ulimit: The specified value exceeds the user's allowable limit.
Shibin_2
Honored Contributor
Solution

Re: How to change the ulimit values in HPUX

You need to check your kernel values of maxssiz ( stack ) and maxdsiz (data ).

You cannot define the higher value than the kernel stack value. Either you need to increase kernel value then to increase users.
Regards
Shibin
Dennis Handly
Acclaimed Contributor

Re: How to change the ulimit values in HPUX

If you have poorly written software, no matter how big you make maxssiz(5), it will still get a recursive stack overflow.

Also, you don't want to make maxssiz to big, it will reduce maxdsiz(5) if already at the max.