Link to home
Start Free TrialLog in
Avatar of demcmahan
demcmahanFlag for United States of America

asked on

How do I limit the system unit time that a process can use?

I have some processes that often hang and I had this thought that maybe they could be killed after they used a fixed amount of cpu resources.  It's easy for me to see that these specific processes have hung by using AIX's "topas" utility.

When I do "ps -ef" I can easily spot the hung processes by looking at the values in the 'C' and 'TIME' columns.

I tried the "chuser" command with the "cpu=" and "cpu_hard=" parameters, but that did not work.

I have two questions:
1.  Can what I want to do be done?
2.  The man page for "chuser" says that "cpu" and "cpu_hard" sets the "largest amount of system unit time (in seconds) that a user's process can use".  How do I monitor "system unit time"?

Don
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
another approach is to simply separate the specific applications into a VM running on the computer. you may control the system resources including CPU usage consumed by the VM (applications).
Avatar of demcmahan

ASKER

Thanks for your reply, but unfortunately, we have no VMs on this machine and setting one up is not an option.
as since W2K3, Windows started supporting QoS for better traffic prioritisation and shaping to specific applications. this may allow you to optimise application performance from a network perspective.

How QoS Works
http://technet.microsoft.com/en-us/library/cc728211%28v=ws.10%29.aspx

be aware that this approach is based on IP address, protocol and port, not related to CPU and memory usage.
POSIX Facility to kill a process after consumiong some CPU time is ulimit

OIf you want to adjust scheduler guaranteeing some resources to critical processes you have to fo to "smitty wlm"