When Users Go Berserk ®

AND

­ a B.O.F.H. tool ­
 


Hosted by
SourceForge Logo

Configuration
This page describes the and.conf configuration file.
Back to main page

AND.CONF

NAME
VERSION
DESCRIPTION
SETTINGS
EXAMPLES
FILES
SEE ALSO
INTERNET

NAME

/etc/and.conf - general configuration parameters for the auto nice daemon.

VERSION

This manual page documents and.conf for and version 1.2.0.

DESCRIPTION

This is the general configuration file for and. It stores settings like the default nice level, the renice intervals, the three stages of renicing, and the affinity of the priority database, i.e. the weight of (user, group, command) when resolving nice levels from the database. These settings are described below.
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

defaultnice
The default nice level. A number between 0 and 19. Jobs for which no entry can be found in /etc/and.priorities are reniced to this level, regardless of the CPU time they've used so far. If you prefer to renice unknown jobs gradually, you can do so by supplying three asterisks as (user, group, command) tuple in /etc/and.priorities. The default nice level is 0
interval
The default interval between nice checks of the auto nice daemon, in seconds. This value can be overridden by the -i command-line option of and. The default interval is 60 seconds.
lv1time
lv2time
lv3time
Ranges for the nice levels. Jobs with less than lv1time seconds CPU time are not reniced; jobs between lv1time and lv2time seconds are reniced to the first level in an.priorities; jobs between lv2time and lv3time seconds to the second level; jobs with more than lv3time seconds are reniced to the third level. Defaults are 120 , 1200 , and 3600 seconds.
minuid, mingid
Minimum user id and group id to be considered for renicing. Processes whose user id is below minuid are left alone, as are processes with a group id of below mingid. (Note that even if you set minuid to zero, root processes are left alone.)
affinity
Strategy for picking the right priority entry for a user/group/job triple. The strategy is a permutation of "cgu", "c"ommand, "g"roup, "u"ser. The order specifies the affinity of the priority lookup method. Suppose you have an entry for all jobs of user foo, another entry for all jobs of group bar, and yet another entry for the command baz. Furthermore suppose user foo (who happens to belong to group bar ) starts a job named baz -- which entry should be chosen? This is what the affinity setting means, for example "cug" means an exact match of the command has priority over both an exact match of the user and the group. The default affinity is "cug", which is probably sensible for most cases, since it's the job which takes up CPU time, not the user or group ID.

EXAMPLES

Default Configuration
# This is the default configuration:
default 0
interval 60
lv1time 300
lv2time 1800
lv3time 3600
affinity cug
minuid 0
mingid 0
Default Configuration, with terminals
# Normal default configuration for all
default 0
interval 60
lv1time 300
lv2time 1800
lv3time 3600
# Hosts foo, bar, baz are terminals and must
# be more responsive, so earlier renice.
on (foo|bar)
lv1time 120
lv2time 600
lv3time 1200
on .*
# This is for all hosts again
affinity cug
Group-specific Hosts
default 0
interval 60
lv1time 300
lv2time 1800
lv3time 3600
# Normal affinity for all hosts.
affinity cug
# Hosts bar, baz belong to group foo, which
# is privilegued on these hosts, so override
# affinity. (Note regexp!)
on ba[rz]
affinity guc
on .*
minuid 500
mingid 100

FILES

/etc/and.conf
General configuration file. Stores default nice level, default interval, the "time zones" and the database lookup affinity. This is what this manual page is about.

SEE ALSO

and(8), and.priorities(5), kill(1), regex(7), renice(8)

INTERNET

http://and.sourceforge.net/
Last modified: Sat Apr 10 22:12:12 CEST 2004