• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

How to restrict cpu usage for a user, and a session on solaris 8

Hi:
We have Solaris 5.8, and I am trying to set up the operating system in such a way that
 1. no user can open more than 10 connections
 2. Total cpu use for all connections does not exceed 15%
 3. each session can not use more than more than 5% cpu.
Please help me to figure out how to do it.
Thanks in advance.
M
0
danclemson
Asked:
danclemson
1 Solution
 
heskyttbergCommented:
Hi!

All connections/users would not be allowed to use more than a total of 15% CPU, that sounds like a little low, I would at least allow 80% toatl CPU usage, 15% then the CPU won't be working at all. What do you need the rest 85% CPU capacity for ?

I don't know how to do this, it sounds like you need some third party software to accomplish this.

But it seems like you are limiting users a little too much.

Regards
/Hans - Erik Skyttberg
0
 
mdhmiCommented:

man project

Mark
0
 
soupdragonCommented:
maxuprc in /etc/system can be used to limit the maximum on. of user processes but this may not be what you want.

If the sessions are interactive logins the easiest thing may be to have a script in the .profile which simply counts the concurrent pseudo terminals in use by the user and terminate the login session if this exceeds 10. Something like 'ps -u $USER -o user,tty | sort -u | wc -l' to get concurrent session count.

As Mark suggests Solaris Resource Manager might be a possibility for limiting the CPU utilisation.

SD
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ldwylieCommented:
man ulimit

not exactly what you want, but it will help you limit resource use on a per-user basis, not by percentage, but by cpu seconds per process, memory size limits and so on.  Just add the command to their .profile, and `chown root .profile;chmod 644 .profile`.

If you are worried about some non-user process not getting enough cpu time, man nice; man renice.
0
 
liddlerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ  No refund

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 
moduloCommented:
PAQed - no points refunded (of 45)

modulo
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now