A Linux system administrator observes that a data analysis script with PID 8675 is consuming excessive CPU resources, impacting other critical services. The administrator needs to lower the script's scheduling priority to free up CPU for other tasks, but the script must continue running. Which command should the administrator use?
The correct command is renice 10 -p 8675. The renice command is used to alter the scheduling priority of an already running process. Niceness values range from -20 (highest priority) to +19 (lowest priority). A positive value, like 10, increases the niceness, thereby lowering the process's priority and making it 'nicer' to other processes by yielding CPU time. The -p flag specifically targets the process by its ID.
renice -10 -p 8675 is incorrect because a negative niceness value would increase the process's priority, which is the opposite of the required action.
nice -n 10 -p 8675 is incorrect because the nice command is used to start a new process with a specified priority, not to change the priority of a running one.
kill -15 8675 is incorrect as it would send a termination signal (SIGTERM) to the process, stopping its execution, which contradicts the scenario's requirement to keep the script running.
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 'niceness' mean in Linux process management?
Open an interactive chat with Bash
What is the difference between 'renice' and 'nice' commands?
Open an interactive chat with Bash
Why is the '-p' flag used with the renice command?
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