/etc/and.priorities(5) priority database for the auto nice daemon.

VERSION

This manual page documents and.priorities for and version 1.2.2.

DESCRIPTION

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.

SETTINGS

A valid entry consists of a line of six columns, separated by one or more spaces. These columns are: (in that order)

user
The user ID the command is running under. May be a user name (which will be looked up in the password file and, if enabled, via NIS), or a numeric user ID, or an asterisk for any user.

group
The group ID the command is running under. May be a group name (which will be looked up in the group file and again, if enabled, via NIS), or a numeric group ID, or an asterisk for any group.

command
The name of the command, without path. May be a command, a regular expression to match multiple commands, or an asterisk for any command. Note that "foobar" will not match "/usr/bin/foobar" - you probably mean ".*foobar" or even ".*foobar.*".

parent
There are two modes of operation for the parent field, determined by a keyword: parent=foobar will match if a process' direct parent process matches the command or regular expression after the equal sign, whereas ancestor=foobar will match if any ancestor process matches. After the keyword and the equal sign goes the name of the parent process, without path. May be a command, a regular expression to match multiple commands, or an asterisk for any command. (You can just use the asterisk if you want to ignore parents for this entry.) Note that again "foobar" will not match "/usr/bin/foobar", as with command.

nicelevel 1
The nice level after lv1time CPU time was used by the command. Positive numbers and 0 are interpreted as nice levels; negative numbers are interpreted as signals to be sent to the command. A "nice level" of 19 will almost stop the job, -9 will actually kill it. (Like in kill -9.) lv1time can be set in /etc/and.conf

nicelevel 2
Same but after lv2time.

nicelevel 3
Same but after lv3time.

EXAMPLES

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

FILES

/etc/and.priorities
The priority database (in plain text). Contains the (user, group, command, nicelevels) tuples. This is what this manual page is about.

AUTHOR

The auto nice daemon and this manual page were written by Patrick Schemitz <[email protected]>