HP OpenVMS Systems

ask the wizard
Content starts here

Controlling Per-Process CPU Usage?

» close window

The Question is:

 
A newsreader program that users use sometimes goes awry and hogs the CPU
time.  When this happens, we first have to notice it, then kill the process
with the "stop proc/id=nnn" command.  In the meantime, the system is slow
for everyone else, batch jobs do
n't complete, etc.
 
I've looked up the parameters for limiting a user's CPU usage, and have
tried them, but they don't seem to have any effect.
 
How can we limit, preferably with a percentage specification, how much of
the CPU time a user, running a process, may use?
 
 


The Answer is :

 
  See the CPULIM quota for the username-level setting.
 
  See RUN[/DETACH|/UIC]/TIME_LIMIT for the process-level setting.
 
  You could also integrate a monitor into the image itself (either
  via the debugger bootstrap or via fix(es) to the image, or you
  could dedicate another process to watch the newsreader process
  for signs of "insanity".
 
  On a system-wide basis, the OpenVMS class scheduler interface can
  be used to restrict the amount of CPU available to a user.  (For
  details, see the manuals and the SYS$EXAMPLES:CLASS.C example.)
 
  Of course, you could also determine the cause of (and then the
  fix for) the problem in the newsreader.
 

answer written or last revised on ( 4-OCT-1999 )

» close window