Operating System - HP-UX
1832152 Members
3094 Online
110038 Solutions
New Discussion

Limit # processes for one specific user in the system

 
SOLVED
Go to solution
Fedon Kadifeli
Super Advisor

Limit # processes for one specific user in the system

I want to limit the number of processes that can be created by a *specific* user in the system. The other users in the system will use the system imposed limit; I want only *this* specific user to have a lower limit. The "ulimit" command does not allow this. Is there any another method?
5 REPLIES 5
Mark Grant
Honored Contributor

Re: Limit # processes for one specific user in the system

The only way I can think about doing this is imposing a limit on the number of file descriptors the user can have with the ulimit command (check ulimit -a). This is a bit of a blunt tool though and you would have to bear in mind that each process will use three file descriptors just to start up plus any others the process might require during it's operation. I'm not sure I would recommend doing it this way but it sounds a fun thing to try.
Never preceed any demonstration with anything more predictive than "watch this"
T G Manikandan
Honored Contributor

Re: Limit # processes for one specific user in the system

User processes are limited in generic.

To my knowledge this cannot be done.
Stanimir
Trusted Contributor

Re: Limit # processes for one specific user in the system

May be you have to write a script by yourself,
which will restrict processes for given
user only. You could catch an output from
"ps" command, sum the number of processes,
related to this user and reject it or
make a warning for system admin.

Another way to restrict user is to restrict the number of session of this user to 1.
For example,you could put a small program code to /etc/prifile. This code have to
check the name of user,who wants to login,
and whether he has already had a session on
the system. If so, you could make a warning to output and reject him. If he have no active session, let him to log in.

Regards,Stan
T G Manikandan
Honored Contributor
Solution

Re: Limit # processes for one specific user in the system

You could be interested to know about this HP product.

This is PRM(Process Resource Manager).

here you can restrict resources to users,groups,application,etc..

Just try the trial and check the docs too.

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=B3835DATRY

DOCS here

http://docs.hp.com/hpux/ha/#Process%20Resource%20Manager
Fedon Kadifeli
Super Advisor

Re: Limit # processes for one specific user in the system

Thanks for the responses. Linux has this solution through the "ulimit -u <#procs>" command.
I thought HP-UX should have it also because I need this for a special case in our system.