1751804 Members
5332 Online
108781 Solutions
New Discussion юеВ

To limit some user

 
SOLVED
Go to solution
cfeitosa
Frequent Advisor

To limit some user

Hello guys!

I'm using HPUX 11.11

Is it possible to limit some user for someones applications, process and so far and so on?

For example... If the user XYZ try to start a process that consume 1GB of memory and 80% of CPU he doesn't will success because I've limited it like:

User: XYZ (*process)
Memory: <= 800MB
CPU: <= 50%

And I don't know if I've explained from a right way but basically what I want is to limit some users through of HPUX and using resources of HPUX.

Please, could someone give me a help?

Thanks!!!!
5 REPLIES 5
DCE
Honored Contributor
Solution

Re: To limit some user



Have you looked at Process Resource Manager and or Work load manager? Between the two of them, you should be able to do what you want.

They are included in the higher end HPUX OS's. If you do not have them they can be purchased as well.
A. Clay Stephenson
Acclaimed Contributor

Re: To limit some user

Anything is possible but it's rather difficult to even define things like memory <= 800MB. Does that mean physical memory or virtual memory? How do you calculate it?

There are some add-on products that do this sort of thing:
http://h20293.www2.hp.com/portal/swdepot/displayProductsList.do?category=ISS


Look for Process Resource Manager (PRM) and Workload Manager (WLM).
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: To limit some user

You can of course limit his memory usage with maxdsiz set with ulimit -m. Set in /etc/profile by testing $LOGNAME.
cfeitosa
Frequent Advisor

Re: To limit some user

Hello!

Thanks for all answer!

Dennis, please could you explain with more details or send an example?

Thank you!!
clefeitosa

Dennis Handly
Acclaimed Contributor

Re: To limit some user

>could you explain with more details or send an example?

In /etc/profile so it can't be bypassed:
name=$(id -u -n)
case $name in
name1|name2|name3)
# set the maximum data area smaller for these
ulimit -d 300000 # size in Kb
;;
esac

The above code sets the ulimit data size to 300Mb for the users name1, name2 or name3.