Every night a mail scanning script runs on a Linux host and slows important services by competing for CPU time. The scan isn’t critical and should only run when the server is idle. Which command invocation guarantees the script starts with the least favorable CPU scheduling weight?
Using -n 19 with nice sets the highest numeric niceness, giving the process the lowest CPU scheduling priority. A negative value like -5 raises its priority. The renice utility changes priority for an existing process and requires a PID. There is no --adjust option for the nice command.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does 'nice' mean in Linux?
Open an interactive chat with Bash
What is CPU scheduling in Linux?
Open an interactive chat with Bash
What is the difference between 'renice' and 'nice'?