How to change the ulimit values in HPUX (13848 Views)
Reply
Occasional Advisor
Kadavan
Posts: 16
Registered: ‎01-31-2011
Message 1 of 5 (13,848 Views)
Accepted Solution

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
Please use plain text.
Honored Contributor
Shibin_2
Posts: 711
Registered: ‎11-11-2005
Message 2 of 5 (13,848 Views)

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
Please use plain text.
Occasional Advisor
Kadavan
Posts: 16
Registered: ‎01-31-2011
Message 3 of 5 (13,848 Views)

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.
Please use plain text.
Honored Contributor
Shibin_2
Posts: 711
Registered: ‎11-11-2005
Message 4 of 5 (13,848 Views)

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
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,853
Registered: ‎03-06-2006
Message 5 of 5 (13,848 Views)

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.
Please use plain text.
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