A Linux administrator needs to run a computationally intensive backup script, backup.sh, on a server that also hosts critical, user-facing applications. To ensure the backup process does not degrade the performance of the other services, it must be started with a lower CPU priority. Which of the following commands should the administrator use?
The correct command is nice -n 15 ./backup.sh. The nice command is used to launch a new process with a specific scheduling priority. The niceness value, specified with the -n flag, ranges from -20 (highest priority) to +19 (lowest priority). A positive value, such as 15, lowers the process's priority, making it 'nicer' to other processes by using CPU resources only when they are not in high demand. The command nice -n -5 ./backup.sh is incorrect because a negative value increases the process's priority, which is the opposite of the requirement. The command renice -n 15 ./backup.sh is incorrect because renice is used to change the priority of an already running process and requires a process ID (PID), not a script name. The command nice --priority=low ./backup.sh is incorrect as --priority=low is not a valid 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 the `nice` command do in Linux?
Open an interactive chat with Bash
How does `renice` differ from `nice`?
Open an interactive chat with Bash
What happens if a process is given a negative niceness value?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access