COMMAND=${1:-"cc1"}
LEVEL=${2:-"10"}
IO_LEVEL=${3:-"3"}
# for pid in $(pgrep "${COMMAND}"); do
# 	renice 10 -p "${pid}";
# done

pgrep "${COMMAND}" | xargs -I {} renice "${LEVEL}" -p "{}"
pgrep "${COMMAND}" | xargs -I {} ionice -c "${IO_LEVEL}" -p "{}"
