(Answer) (Category) SCO UnixWare 7/OpenUNIX 8/OpenServer 6 FAQ : (Category) System Administration :
How do I control process priority in Uw7/OSR6, with nice?
Nice, renice and priocntl are the commands.

The priority of a process is an integer value that represents how much time to spend working on that process versus the other processes. The priority in Uw7/OSR6 ranges from -20 to 20, for very nice to very much a cpu hog respectively.

   To view a process's priority, whose PID is 842, use   priocntl -d 842

   Ex. 1.  Making myprog nicer to other users:
   ------------------
   If you're about to run myprog, use                   nice -n 10 myprog
   If myprog is a process with pid 842, use           renice -n 10 842


   Ex. 2.  Making myprog grab more cpu cycles so that it completes faster:
   ----------------------
   Only a privileged user can boost a priority.
If you're about to run myprog, use nice -n -10 myprog If myprog is a process with pid 842, use renice -n -10 842

   When you run a program in the background with an &, it's priority is -4.
   When you run a program in the foreground, it gets a 0.
   That's a difference of only 5, but we know from experience that's big.
When you use renice, it reports back strange things that you'll just have stare at to understand. You can trust the output from priocntl.

   Only a priveleged user can boost a prioity.

<mschalit@pacbell.net>
gerberb@zenez.com

[Append to This Answer]
Previous: (Answer) How do I lock an account? How do I unlock a locked account?
Next: (Answer) What's good to know about cron in Uw7/OSR6?
This document is: http://www.zenez.com/cgi-bin/ou8faq/faq?file=163
[Search] [Appearance]
This is a Faq-O-Matic 2.721.