?
Solved

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

Posted on 2003-03-13
6
Medium Priority
?
646 Views
Last Modified: 2013-12-21
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
Comment
Question by:danclemson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

by:heskyttberg
ID: 8138397
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
 
LVL 1

Expert Comment

by:mdhmi
ID: 8141128

man project

Mark
0
 
LVL 2

Expert Comment

by:soupdragon
ID: 8150399
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
Independent Software Vendors: 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!

 
LVL 1

Expert Comment

by:ldwylie
ID: 8565389
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
 
LVL 18

Expert Comment

by:liddler
ID: 10475241
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10517056
PAQed - no points refunded (of 45)

modulo
Community Support Moderator
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question