1AND.PRIORITIES(5)                File Formats                AND.PRIORITIES(5)
2
3
4

NAME

6       /etc/and/and.priorities - priority database for the auto nice daemon.
7
8
9

VERSION

11       This manual page documents and.priorities for and version 1.2.2.
12
13
14

DESCRIPTION

16       This  is  the  priority database file for and.  It stores (user, group,
17       command, parent,  nicelevels)  tuples  (hereafter  called  entries)  to
18       determine the new nice level (or the kill signal, for that matter) when
19       a job reaches one of the  time  limits  defined  in  /etc/and/and.conf.
20       (See  lv1time,  lv2time,  and  lv3time  on the and.conf manual page for
21       details.) See the affinity setting in /etc/and/and.conf for how ambigu‐
22       ities  between the fields (user, group, command, parent) are dealt with
23       when searching the database to determine the new nice level for a  job.
24       Note  that  if more than one entry matches with the same accuracy (e.g.
25       with a parent= entry and an ancestor= entry), the last entry wins!
26
27       Comments start with a # in the first column.  Empty lines are  ignored.
28       Unlike  with  other  configuration  files, lines cannot be concatenated
29       with a backslash. Furthermore, this file is case sensitive.
30
31       and allows for host-specific sections in the configuration file.  These
32       work  as  lines of the form on somehost and work as follows: the parser
33       determines if the host name (as returned by  gethostname)  matches  the
34       extended regular expression that follows the on keyword. If it does, it
35       just keeps processing the file as if nothing had happened. If  it  does
36       not match, however, everything up to the next on keyword is skipped. So
37       if you want to end a  host-specific  section,  you  must  write  on  .*
38       (which matches all hosts) to switch back to normal.
39
40       Don't forget to kill -HUP the auto nice daemon to enable the changes.
41
42
43

SETTINGS

45       A  valid  entry  consists of a line of six columns, separated by one or
46       more spaces. These columns are: (in that order)
47
48
49       user The user ID the command is running  under.  May  be  a  user  name
50            (which will be looked up in the password file and, if enabled, via
51            NIS), or a numeric user ID, or an asterisk for any user.
52
53
54       group
55            The group ID the command is running under. May  be  a  group  name
56            (which  will be looked up in the group file and again, if enabled,
57            via NIS), or a numeric group ID, or an asterisk for any group.
58
59
60       command
61            The name of the command, without path. May be a command, a regular
62            expression to match multiple commands, or an asterisk for any com‐
63            mand.  Note that "foobar" will not match "/usr/bin/foobar"  -  you
64            probably mean ".*foobar" or even ".*foobar.*".
65
66
67       parent
68            There  are two modes of operation for the parent field, determined
69            by a keyword: parent=foobar will match if a process' direct parent
70            process  matches the command or regular expression after the equal
71            sign, whereas ancestor=foobar will match if any  ancestor  process
72            matches. After the keyword and the equal sign goes the name of the
73            parent process, without path. May be a command, a regular  expres‐
74            sion  to  match multiple commands, or an asterisk for any command.
75            (You can just use the asterisk if you want to ignore  parents  for
76            this   entry.)   Note   that   again   "foobar"   will  not  match
77            "/usr/bin/foobar", as with command.
78
79
80       nicelevel 1
81            The nice level after lv1time CPU time was  used  by  the  command.
82            Positive  numbers  and  0 are interpreted as nice levels; negative
83            numbers are interpreted as signals to be sent to  the  command.  A
84            "nice level" of 19 will almost stop the job, -9 will actually kill
85            it. (Like in kill -9.)  lv1time can be set in /etc/and.conf
86
87
88       nicelevel 2
89            Same but after lv2time.
90
91
92       nicelevel 3
93            Same but after lv3time.
94
95
96

EXAMPLES

98       Here are some entries from the real world (i.e. from  "my"  cluster  at
99       the Institute). As lv[123]time, 5 min., 20 min., and 1 hour is assumed.
100       (Which is the default. See /etc/and.conf for details.) You  might  also
101       check the default priority database that comes with and.
102
103
104       # A finer default nice level
105       * * * * 4 8 12
106
107       # User dau is an idiot, so treat him like accordingly
108       dau * * * 19 19 19
109
110       # Netscape sometimes goes berserk, we must stop it
111       * * netscape * 4 -9 -9
112
113       # Most hosts are free for everyone but some are
114       # especially for the FOO group
115       * * * * 4 8 12
116       on (bar|baz)
117       * * * * 8 12 16
118       # ... or, more radical: * * * * -9 -9 -9
119       * foo * * 4 8 12
120       on .*
121
122       # KDE screen savers...
123       * * .*kss * 16 16 16
124
125       # Grid jobs (assuming they are started by a master
126       # process)
127       * * * ancestor=grid_master 10 10 10
128       # Now some clever yet deceitful user might start all
129       # his jobs using a shell script named grid_master.
130       # He shall regret... whereas the original grid_master
131       # (owned by grid) is left alone.
132       * * grid_master * -9 -9 -9
133       grid * grid_master * 0 0 0
134
135

FILES

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

SEE ALSO

145       and(8), and.conf(5), kill(1), regex(7), renice(8)
146
147
148

INTERNET

150       http://and.sourceforge.net/
151
152
153

AUTHOR

155       The  auto  nice  daemon  and  this  manual page were written by Patrick
156       Schemitz <schemitz@users.sourceforge.net>
157
158
159
160Unix                              27 Mar 2005                AND.PRIORITIES(5)
Impressum