nice and ionice combined to a single utility, written in pure Go
GPL-2.0 License
Easy implements the functionality of both nice
and ionice
without using C.
It's also a drop-in replacement for ionice
(from util-linux).
ionice
to Go, but more functionality has been added since then.Run chromium
in a very relaxed way (nice both in terms of CPU usage and in terms of I/O usage):
easy -c3 -N chromium
The same as above, but with the easier to remember --both
or -b
flag:
easy -b chromium
ionice
These flags are for adjusting the process niceness (from nice
not ionice
):
-N
or --nice
can be used to also set the process niceness to 10 (same as nice COMMAND
).-s
or --setnice
can be used to set the process niceness.-a
or --adjustment
can be used to adjust the process niceness by the given offset.ionice
from util-linux.nice
from coreutils.ionice
, in only 300 lines of C.ionice
utility has been ported to Go.This port exists mainly because I wanted to have a Go module for changing the I/O priority of servers written in Go. It was relatively easy to add a port of the ionice
utility as well, once that was done.
go build -mod=vendor
install -Dm755 easy /usr/bin/easy
gzip easy.1
install -Dm644 easy.1.gz /usr/share/man/man1/easy.1.gz
go install github.com/xyproto/easy@latest