Hi Managers,
I have modified the Autonice package from 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 a 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.
If you don't specify a "default rule", than the processes not matching
the rules in the config file won't be affected by autonice.
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.config
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 that 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 provided '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
p.d. this is a copy of a message sent on july, 29th, that for some reasons
seems not to have been distributed on the whole list
--
--------------------------------------------------------------------
| Massimo Ianigro | E-write at : Massimo.Ianigro_at_ba.cnr.it |
| C . N . R . | M.Ianigro_at_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 |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Le cose buone della vita sono molto sensibili, |
| se non le guardi con un sorriso, fuggono via... |
--------------------------------------------------------------------
Received on Fri Aug 30 1996 - 18:12:04 NZST