RENICED(1)
π RENICED π
okay bestie, buckle up β this is reniced, section 1 of the manual, and it's literally the little script that goes around telling your running processes to chill tf out (or hype up, your call π
).
β¨ NAME β¨
reniced β renice running processes based on regular expressions. periodt.
πΈ SYNOPSIS πΈ
reniced [-h] [-v] [-o format] [configfile]
π¦ OVERVIEW π¦
so the whole vibe is this: reniced takes a list of regular expressions, goes looking for processes (and threads, yes threads too) that match them, and reniced the processes to given values. it can also change io priorities. multi-talented icon behavior honestly. π
π DESCRIPTION π
on start, reniced reads a configuration file. that file is made of nice values and regular expressions. no cap.
then it scans the process table using the ps(1) command. whenever a process name from the CMD column matches a regular expression, that process gets reniced to the given value. and if a process matches multiple regular expressions? all rule matches are executed in order and the last match wins. last one standing takes the crown, we don't make the rules. π
when you run it as root, reniced will scan all processes (ps H -e). when you run it as a user, renice only scans your processes (ps H --user). know your lane, love that for us. β¨
π Switches π
-hβ prints the version number, a short help text, and exits without doing anything. it's giving "just here for the lore, not the labor". π-nβ activates no-op mode. no actions are taken, but everything that would be done is written tostdout. it's a rehearsal, bestie. a dress rehearsal. π-vβ activates verbose mode. error messages, some statistics, and all renice actions get printed tostdout. she's a talker and we love her for it. π¬-oformatβ set theps(1)output format to filter on. the default format is"comm". see the-oparameter in theps(1)manpage for details.configfileβ this reads the regular expressions from an alternate configfile. the default location of the configfile is"/etc/reniced.conf"if reniced is run as root, and"~/.reniced"otherwise. location location location. π‘
π Configuration file format π
the configuration file is composed of single lines. empty lines and lines starting with a # are ignored (they're just vibing, let them be).
every line must consist of a command followed by a whitespace and a Perl regular expression.
the regular expression is matched against the ps(1) output. for every matched process the command is executed.
a command generally takes the form of a character followed by a number. multiple commands can be given simultaneously with no spaces inbetween. sometimes the number is optional. (she's flexible, she contains multitudes π )
π Command characters π
nβ sets the nice value of a process. must be followed by a number, usually within the range of-20to19. for backwards compatibility, annat the beginning of the command can be left out (if the command starts with a number it is treated as a nice value).rβ sets the io priority to the realtime scheduling class. the optional number is treated as class data (typically0-7, lower being higher priority).bβ sets the io priority to the best-effort scheduling class. the optional number is treated as class data (typically0-7, lower being higher priority).iβ sets the io priority to the idle scheduling class. no number needs to be given as the idle scheduling class ignores the class data value. she simply does not care about your numbers. πoβ sets the OOM killer adjustment in"/proc/$PID/oom_adj"to the given number. (internally,"/proc/$PID/oom_score_adj"will be used when available, but for backwards compatibility this value is still expected the in old"oom_adj"format and will be converted automatically.)
π§ Examples π§
"5 ^bash"β gives currently running bash shells a nice value of5"b2 ^tar"β sets currently running tar-processes to io priority best-effort within class2"i torrent"β sets currently running torrent-like applications to io priority idle"n-10r4 seti"β gives currently running seti-processes a nice value of-10and sets them to realtime io priority in class4
π MODULES NEEDED π
use BSD::Resource;
this module can be obtained from <http://www.cpan.org>. go get her. ποΈ
β PROGRAMS NEEDED β
ps
ionice
ionice is only needed if you want to change io priority. it can be obtained from <http://rlove.org/schedutils/>.
you also need a suitable kernel and scheduler, e.g. Linux 2.6 with CFQ. the full package, no substitutions. πΈ
π LIMITATIONS π
the purpose of reniced is to renice long running server processes (hence the d for daemon in it's name). she's built for the long haul, not for the situationship processes.
selecting and renicing processes is not atomic: there is a small gap between scanning the process list and renicing the processes. if you target short-lived processes with your regular expressions, reniced might try to act on a process that is already gone. and in the worst case, it might renice a new process that got the same process id as the already ended process that was matched. π race conditions stay undefeated, unfortunately.
π BUGS π
reniced can run without the BSD::Resource module. in this case, the PRIO_PROCESS is set to 0. this works on Linux 2.6.11 i686 but it could break on other systems. installing BSD::Resource is the safer way. do the safe thing, bestie. π«Ά
be careful using realtime priorities, don't starve other tasks. seriously. not a drill. π¨
please report bugs to <mitch@cgarbs.de>.
π AUTHOR π
reniced was written by Christian Garbs <mitch@cgarbs.de>. a legend, frankly. π
π COPYRIGHT π
reniced is Copyright (C) 2005, 2020 by Christian Garbs. It is licensed under the GNU GPL v2 or later.
π AVAILABILITY π
look for updates at <https://github.com/mmitch/reniced>. go star the repo, it's free and it's kind. β
π SEE ALSO π
and that's the whole thing, babes β this was version 1.23, dated 2021-05-23, and it's the reniced manual page from the reniced source. stay nice (or don't, that's literally the point of this program) πβ¨
π¦ where this page comes from
- debian trixie: reniced 1.23-1 Β· GPL-2.0-or-later
- ubuntu questing: reniced 1.23-1
- ubuntu resolute: reniced 1.23-2 Β· GPL-2.0-or-later
- ubuntu stonking: reniced 1.23-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms