AND.CONF(5)
π AND.CONF(5) π
okay bestie, welcome to the manual page for /etc/and.conf β the general config file for the auto nice daemon. it lives in the File Formats section of the manual, and yes, the vibe is immaculate. π
β¨ VERSION β¨
this page documents and.conf for and version 1.2.2. noted. π
πΈ DESCRIPTION πΈ
so this is THE general config file for and, your fave little auto nice daemon. it holds all the settings like the default nice level, the renice intervals, the three stages of renicing, and the affinity of the priority database β aka the weight of (user, group, command) when it's out here resolving nice levels from the database. all of those get explained below, don't worry. π«Ά
now, the rules of the file, listen up:
- comments start with a
#in the first column β first column only, she's picky - empty lines are just ignored, they're not the moment
- unlike other config files, you cannot concatenate lines with a backslash. no. not happening. π«
- and this file is case sensitive. periodt.
and here's the iconic part: and allows for host-specific sections in the config file. these work as lines of the form on somehost, and they work like this: the parser checks if the host name (as returned by gethostname) matches the extended regular expression that follows the on keyword. if it matches β slay, 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 wanna end a host-specific section, you have to write on .* (which matches all hosts, she's universal like that) to switch back to normal.
π¨ bestie do NOT forget to kill -HUP the auto nice daemon to actually enable the changes. no cap.
β SETTINGS β
defaultniceβ the default nice level. a number between0and19. jobs where no entry can be found in/etc/and.prioritiesget reniced to this level, no matter how much CPU time they've used so far. if you'd rather renice unknown jobs gradually, you can do that by supplying three asterisks as the (user, group, command) tuple in/etc/and.priorities. the default nice level is0.intervalβ the default interval between nice checks of the auto nice daemon, in seconds. this value can be overridden by the-icommand-line option ofand. the default interval is60seconds.lv1timelv2timelv3timeβ the ranges for the nice levels. jobs with less thanlv1timeseconds CPU time are not reniced. jobs betweenlv1timeandlv2timeseconds get reniced to the first level inan.priorities; jobs betweenlv2timeandlv3timeseconds to the second level; jobs with more thanlv3timeseconds get reniced to the third level. defaults are120,1200, and3600seconds.minuid,mingidβ minimum user id and group id to be considered for renicing. processes whose user id is belowminuidare left alone, and same for processes with a group id belowmingid. (note that even if you setminuidto zero, root processes are left alone. yes really. π)affinityβ the 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 userfoo, another entry for all jobs of groupbar, and yet another entry for the commandbaz. furthermore suppose userfoo(who happens to belong to groupbar) starts a job namedbazβ which entry should be chosen?? this is what theaffinitysetting 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 that takes up CPU time, not the user or group ID. main character energy is the job, fr fr. π
π EXAMPLES π
Default Configuration
# This is the default configuration:
defaultnice 0
interval 60
lv1time 300
lv2time 1800
lv3time 3600
affinity cug
minuid 0
mingid 0
Default Configuration, with terminals
# Normal default configuration for all
defaultnice 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
defaultnice 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 privileged 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 the default nice level, default interval, the "time zones" and the database lookup affinity. this is literally what this whole manual page is about. iykyk. π
π SEE ALSO π
and(8), and.priorities(5), kill(1), regex(7), renice(8)
π INTERNET π
π AUTHOR π
the auto nice daemon and this manual page were written by Patrick Schemitz <schemitz@users.sourceforge.net>. iconic behavior, we love to see it. π«Ά
and that's the whole page bestie!! this all shipped back on 27 Mar 2005 under the Unix manual section, and honestly? it still ate. go forth, configure your daemon, and remember to kill -HUP πβ¨
π¦ where this page comes from
- debian bookworm: and 1.2.2-4.2
- debian trixie: and 1.2.2-4.3+b2
- ubuntu jammy: and 1.2.2-4.2
- ubuntu noble: and 1.2.2-4.2
- ubuntu questing: and 1.2.2-4.3
- ubuntu resolute: and 1.2.2-4.3build1
- ubuntu stonking: and 1.2.2-4.3ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms