XK0-004 · Question #26
A junior Linux administrator is optimizing a system in which an application needs to take priority 0 when running the process. The administrator runs the ps command and receives the following…
The correct answer is A. Issue the command ronice -n 0 -p 8481. The renice command changes the scheduling priority of a running process. Setting a nice value of 0 for a specific PID requires the correct flags and syntax.
Question
A junior Linux administrator is optimizing a system in which an application needs to take priority 0 when running the process. The administrator runs the ps command and receives the following output:
Given this scenario, which of the following steps will address this issue?
Options
- AIssue the command ronice -n 0 -p 8481
- BIssue the command renice -p 8481
- CIssue the command
- DIssue the command renice -n 8481
How the community answered
(49 responses)- A73% (36)
- B14% (7)
- C8% (4)
- D4% (2)
Why each option
The renice command changes the scheduling priority of a running process. Setting a nice value of 0 for a specific PID requires the correct flags and syntax.
The command renice -n 0 -p 8481 correctly uses the -n flag to specify the target nice value of 0 and the -p flag to target the process by its PID 8481. This is the proper renice syntax for setting a specific nice value on a running process identified by PID.
renice -p 8481 omits the required -n flag and nice value argument, so the command lacks the information needed to change the process priority.
The command text is absent from this choice and cannot be evaluated.
renice -n 8481 incorrectly uses the PID as the nice value argument, and 8481 is far outside the valid nice value range of -20 to 19.
Concept tested: Adjusting running process priority with renice
Source: https://man7.org/linux/man-pages/man1/renice.1.html
Topics
Community Discussion
No community discussion yet for this question.