This is `autonice', a program to automatically lower the priority
level of long lived processes for DEC OSF/1 AXP.  

The principal aim of the program is to give short lived interactive
processes more CPU time than long lived `batch style' jobs.  The idea
behind this is that those long lived jobs might take a little longer
to complete, but if a process is going to run for 24 hours anyway
then it doesn't matter too much if it takes an extra 30 minutes.

This is a version modified by Massimo Ianigro <massimo@area.ba.cnr.it>;
the previous version was written by (see README.ORIGINAL for more details):

------------------------------------------------------------------------------
R. P. Bellis				E-Mail:	<Ray.Bellis@psy.ox.ac.uk>
Computing Officer
MRC Centre in Brain and Behaviour
Dept of Experimental Psychology
University of Oxford
South Parks Road			Tel:	+44 1865 271359
Oxford OX1 3UD				Fax:	+44 1865 310447
------------------------------------------------------------------------------

and this is an extract from the mail I sent to the alpha-osf-managers
mailing list announcing the new release:



Hi Managers,
I have modified the Autonice package made by Ray Bellis including some
useful (in my opinion) features.

With this release you can define the behaviour of autonice on a 
per-user and/or per-process base and also you can determine how
aggressive it will be in lowering priorities.

This is an example of the configuration file:

  # This is a config. file for autonice
  # comment lines start with # in first column
  # putting a * in the user or process column means 'everything'
  #
  #  Username   Process    minimunpriority    maximumpriority
  #
  # the following line means "don't lower below 2 all the xemacs processes
  *               xemacs-19.14    2               0
  # this line means don't lower massimo's processes below 10
  massimo         *               10              0
  # this line means run all the processes belonging to slowly at 18
  slowly          *               18              18
  # and then this is the default rule for all the users
  *               *               20              0

The rules are choosen on a first match, first-use base.. so if your
first valid line is something like:
#    user    proc     min    max
      *       *       20      0

than it will match everything and all the subsequent lines won't be 
evaluated.


In order to let autonice use this file, you must define the environment
variable AUTONICE_CONFIG pointing to it. Es. (C-shell)

        setenv AUTONICE_CONFIG /etc/autonice


Consider also that you can't use the whole path for an executable in the
"process" column because the ioctl function used in autonice returns only
the last part of the command name. This means that different programs could
appear having the same name and, up to now, there is no way to distinguish
between them. If your users are not very hostile, this won't be a very big 
problem.. :)

Another feature I have added is the ability to tell autonice how fast
it will be by specifying the amount in minutes a process will take to reach
the lowest priority.
For example, if you specify a convergence time of 15 minutes:

        autonice 15

it means the a process will reach the slowest priority (20) after 15 minutes
of CPUtime. 

If you don't specify the config file, autonice will work on all processes
excepting root.
If you don't specify the convergence time, than it will use a default of 30 
minutes.

In presence of errors (opening config file, parsing lines, setting priority,
 etc.) they will be reported via syslog facilities at LOG_INFO level.

This program has been tested on our systems and seems to work; any way,
it is proveded 'as is', without any implied.. blah blah blah


The program is available on ftp://ftp.ba.cnr.it/pub/users/massimo/autonice-0.5
For those interested in the original version, see:

   ftp://ftp.mrc-bbc.ox.ac.uk/pub/dec_alpha/autonice-x.xx.tar.gz


	Enjoy,

		massimo

 --------------------------------------------------------------------
| Massimo Ianigro     | E-write at :       Massimo.Ianigro@ba.cnr.it |
|   C . N . R .       |                    M.Ianigro@it.embnet.org   |
| Via Amendola, 166/5 | URL:   http://www.ba.cnr.it/~massimo         |
| 70126  BARI   ITALY | Phone: 39 80 5482176/80/30/00  Fax : 5484467 |
 --------------------------------------------------------------------

