AND.PRIORITIES(5) | File Formats | AND.PRIORITIES(5) |
/etc/and.priorities - priority database for the auto nice daemon.
This manual page documents and.priorities for and version 1.2.2.
This is the priority database file for and. It stores (user, group, command, parent, nicelevels) tuples (hereafter called entries) to determine the new nice level (or the kill signal, for that matter) when a job reaches one of the time limits defined in /etc/and.conf. (See lv1time, lv2time, and lv3time on the and.conf manual page for details.) See the affinity setting in /etc/and.conf for how ambiguities between the fields (user, group, command, parent) are dealt with when searching the database to determine the new nice level for a job. Note that if more than one entry matches with the same accuracy (e.g. with a parent= entry and an ancestor= entry), the last entry wins!
Comments start with a # in the first column. Empty lines are ignored. Unlike with other configuration files, lines cannot be concatenated with a backslash. Furthermore, this file is case sensitive.
and allows for host-specific sections in the configuration file. These work as lines of the form on somehost and work as follows: the parser determines if the host name (as returned by gethostname) matches the extended regular expression that follows the on keyword. If it does, it just keeps processing the file as if nothing had happened. If it does not match, however, everything up to the next on keyword is skipped. So if you want to end a host-specific section, you must write on .* (which matches all hosts) to switch back to normal.
Don't forget to kill -HUP the auto nice daemon to enable the changes.
A valid entry consists of a line of six columns, separated by one or more spaces. These columns are: (in that order)
Here are some entries from the real world (i.e. from "my" cluster at the Institute). As lv[123]time, 5 min., 20 min., and 1 hour is assumed. (Which is the default. See /etc/and.conf for details.) You might also check the default priority database that comes with and.
# A finer default nice level
* * * * 4 8 12
# User dau is an idiot, so treat him like accordingly
dau * * * 19 19 19
# Netscape sometimes goes berserk, we must stop it
* * netscape * 4 -9 -9
# Most hosts are free for everyone but some are
# especially for the FOO group
* * * * 4 8 12
on (bar|baz)
* * * * 8 12 16
# ... or, more radical: * * * * -9 -9 -9
* foo * * 4 8 12
on .*
# KDE screen savers...
* * .*kss * 16 16 16
# Grid jobs (assuming they are started by a master
# process)
* * * ancestor=grid_master 10 10 10
# Now some clever yet deceitful user might start all
# his jobs using a shell script named grid_master.
# He shall regret... whereas the original grid_master
# (owned by grid) is left alone.
* * grid_master * -9 -9 -9
grid * grid_master * 0 0 0
and(8), and.conf(5), kill(1), regex(7), renice(8)
http://and.sourceforge.net/
The auto nice daemon and this manual page were written by Patrick Schemitz <schemitz@users.sourceforge.net>
27 Mar 2005 | Unix |