benice is a program that applies CPU and I/O policies on system processes. It uses a predefined set of rules that can be extended and customized.
benice only depends on zig master version.
$ make $ sudo make install PREFIX=/usr
benice uses a client/server architecture. Therefore to properly work
daemon should be started. For security reasons (explained here),
beniced needs to be run as root:
benice can also work without the daemon, but it will need to read the rules each time. This can cause significant overhead when the number of rules to read is significant.
You can also use the provided systemd service to run beniced:
$ systemctl enable beniced $ systemctl start beniced
benice can be used in two different ways:
benicebefore calling an executable
/usr/local/beniceand prepend this directory to
This is the easiest way that lets you apply benice rule to an executable.
cat (provided that there is a rule for it), type:
$ benice cat [[args] ...]
This is the preferred method because this way benice can apply the rules to all supported processes on the system.
Run the following command to setup the symlinks in
benice installs by default a profile file in
/etc/profile.d/ that prepend
its directory to
PATH. However, if you manually set this value in your
.bashrc, you need to adjust it accordingly.
To set high I/O and CPU priorities, benice executable respectively needs
CAP_SYS_NICE capabilities. These capabilities can
only be set by the root user but benice executable does not require
root privileges to be used and can potentially set high priorities to
malicious processes. As a security reason, only users with root privileges
can add rules. The daemon will listen on a low number port, so any non-root
process cannot impersonate
benice is licensed under GPLv3.