Operating System - HP-UX
1833782 Members
2189 Online
110063 Solutions
New Discussion

ulimit : How to set this value, hard set & soft set

 
Mike_108
Advisor

ulimit : How to set this value, hard set & soft set

I'm currently using HP-UX 11.0, my problem is how can i set the ulimit value for disk into certain value. and this setting will remains the same even user log out and log in back, that means permanent until user make the changes.

thanks & regards,
5 REPLIES 5
Paul Sperry
Honored Contributor

Re: ulimit : How to set this value, hard set & soft set

you could include them in the users .profile or
.login scripts.
Sridhar Bhaskarla
Honored Contributor

Re: ulimit : How to set this value, hard set & soft set

Hi,

I believe you are talking about the write file size parameter.

Edit the .profile of the user and keep ulimit -f no_of_512bytes
into it.

Add -H for hardlimit and -S for softlimit.

If you want to set it hard, you would need to put it in /etc/profile with an "if" statement to do it only for that user or certain users. Otherwise, the user can change his/her profile to adjust the parameter.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mike_108
Advisor

Re: ulimit : How to set this value, hard set & soft set

thanks for the solutions, but that one is to set the value for every single user, so, how can i set it to effect the whole system, that mean like setting it under kernel configurable parameter.

Re: ulimit : How to set this value, hard set & soft set

Hi,

I think the solution for your problem is using quotas.
Look in the manual:

"Managing Systems and Workgroups:
A Guide for HP-UX System Administrators"

Chapter 6:
Administering a System: Managing Disks and Files
Managing File Systems
Managing Disk Space Usage with Quotas

Ivone.
Steven E. Protter
Exalted Contributor

Re: ulimit : How to set this value, hard set & soft set

[3470#] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 4096

You can change these parameters as root user with the following commands

ulimit -f for files
-d for descriptors

as an example. As you see, I've messed with mine already.

Just in case you are getting an error from the oracle profile program, there is a coding change you need to make to their environment script, it wasn't properly tested on HP-UX.

Hit me here or buzz me an email if you need to see the oracle code.

Steve
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