Avatar of demcmahan
Flag 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"?

Unix OS

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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).

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

be aware that this approach is based on IP address, protocol and port, not related to CPU and memory usage.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

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"