Man Linux: Main Page and Category List

NAME

       reniced - renice running processes based on regular expressions

SYNOPSIS

       reniced [-h] [-v] [configfile]

OVERVIEW

       reniced takes a list of regular expressions, looks for processes (and
       threads) matching them and renices the processes to given values.
       reniced can also change io priorities.

DESCRIPTION

       On start, reniced reads a configuration file.  It consists of nice
       values and regular expressions.

       It then scans the process table using the ps(1) command.  Whenever a
       process name from the CMD column matches a regular expression, that
       process is reniced to the given value.  If a process matches multiple
       regular expressions, all rule matches are executed in order and the
       last match wins.

       When run as root, reniced will scan all processes (‘ps H -e‘).  When
       run as a user, renice only scans the user’s processes (‘ps H --user‘).

       Switches

       -h   This prints the version number and a short help text.

       -v   This activates verbose mode.  Error messages, some statistics and
            all renice actions are printed to stdout.

       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, "~/.reniced" otherwise.

       Configuration file format

       The configuration file is composed of single lines.  Empty lines and
       lines starting with a # are ignored.

       Every line must consist of a command followed by a whitespace and a
       Perl regular expression.

       The command consists of a nice value, an io prority or both.  A nice
       value is given as a decimal, usually within the range of -20 to 19.  An
       io priority consists of the scheduling class (r for realtime, b for
       best-effort and i for idle) optionally followed by the class data
       (typically 0-7, lower being higher priority).

       Examples

       5 ^bash
            gives currently running bash shells a nice value of 5

       b2 ^tar
            sets currently running to io priority best-effort within class 2

       i torrent
            sets currently running torrent-like applications to io priority
            idle

       -10r4 seti
            gives currently running seti-processes a nice value of -10 and
            sets them to realtime io priority in class 4

MODULES NEEDED

        use BSD::Resource;

       This module can be obtained from <http://www.cpan.org>.

PROGRAMS NEEDED

        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.

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.

       Be careful using realtime priorities, don’t starve other tasks.

       Please report bugs to <mitch@cgarbs.de>.

AUTHOR

       reniced was written by Christian Garbs <mitch@cgarbs.de>.

COPYRIGHT

       reniced is Copyright (C) 2005,2007 by Christian Garbs.  It is licensed
       under the GNU GPL.

AVAILABILITY

       Look for updates ad <http://www.cgarbs.de/stuff.en.html>.

SEE ALSO

       ionice(1), renice(1)