1AND(8) Administrator's Tools AND(8)
2
3
4
6 and - auto nice daemon
7
8
10 and [-htvsx] [-i interval] [-c /path/to/and.conf] [-d /path/to/and.pri‐
11 orities]
12
13
14
16 This manual page documents and version 1.2.2.
17
18
20 The auto nice daemon activates itself in certain intervals and renices
21 and even kills jobs according to their priority and CPU usage.
22
23 Renice levels and kill signals can be defined in terms of users,
24 groups, and commands. Wildcards can be specified for any of these. In
25 addition, commands can be specified using POSIX regular expressions. To
26 allow for network-wide configuration and priority files, a mechanism
27 for hostname-based evaluation is provided, again supporting regular
28 expressions for specifying host names.
29
30 Jobs owned by root are left alone. Jobs are never increased in their
31 priority.
32
33 Here are some real-world examples:
34
35 A certain user is notorious for wasting CPU with next-to-irrelevant
36 jobs. One line is sufficient to renice all of his jobs to about 19.
37 This is a typical situation for a LART (Luser's Attitude Readjustment
38 Tool) like and.
39
40 A CPU server is dedicated to a certain group, but others may also use
41 it when it's idle. Just define default nice levels of e.g. 18 and a
42 lower nice level for the privilegued group, say nice level 12.
43
44 A certain web browser who shall remain unnamed tends to go berserk once
45 in a while. You can configure and to kill -9 it after e.g. 20 CPU min‐
46 utes.
47
48
49
51 -c /path/to/and.conf
52 Specifies the configuration file. If this flag is omitted,
53 /etc/and/and.conf is used instead.
54
55
56 -d /path/to/and.priorities
57 Specifies the priority database file. If this flag is omitted,
58 /etc/and/and.priorities is used instead.
59
60
61 -h Produces a short help text.
62
63
64 -i interval
65 Sets the interval between nice level checks. This flag overrides
66 the interval specified in the configuration file, if any. The
67 default interval of 60 seconds is used if neither -i nor an inter‐
68 val directive in the configuration file is given.
69
70
71 -s Log to stdout. Without this switch, logging goes to syslog (normal
72 operations) or ./debug.and (test mode). Useful for debugging con‐
73 fig files.
74
75
76 -t Run in test mode only, i.e. don't really renice or kill anything.
77 In this mode, logging goes into ./debug.and instead of syslog.
78
79
80 -v Increase verbosity. For maximum verbosity, this flag can be speci‐
81 fied multiple times. Be warned that this will blow up your log
82 files, so you should use it in test mode only.
83
84
85 -x Run in full operational mode, i.e. really renice or kill things.
86 This is the default.
87
88
90 On kill -HUP the auto nice daemon will reload its configuration file
91 and priority database.
92
93
94
96 /etc/and/and.conf
97 General configuration file. Stores default nice level, default
98 interval, the "time zones" and the database lookup affinity.
99
100
101 /etc/and/and.priorities
102 The priority database (in plain text). Contains the (user, group,
103 command, nicelevels) tuples.
104
105
106 Both files have their own manual pages.
107
108
109 ./debug.and
110 Contains logging and status information for debugging purposes.
111 Used in test mode only.
112
113
115 and.conf(5), and.priorities(5), kill(1), regex(7), renice(8)
116
117
118
120 http://and.sourceforge.net/
121
122
123
125 The auto nice daemon and this manual page were written by Patrick
126 Schemitz <schemitz@users.sourceforge.net>
127
128
129
130Unix 27 Mar 2005 AND(8)