XK0-005 · Question #113
An administrator notices that a long-running script, /home/user/script.sh, is taking up a large number of system resources. The administrator does not know the script's function. Which of the…
The correct answer is A. renice. The renice command is used to change the scheduling priority of an already running process, thereby minimizing its impact on system resources without terminating it.
Question
An administrator notices that a long-running script, /home/user/script.sh, is taking up a large number of system resources. The administrator does not know the script's function. Which of the following commands should the administrator use to minimize the script's impact on system resources?
Options
- Arenice
- Bkill
- Cbg
- Dnohup
How the community answered
(26 responses)- A73% (19)
- B8% (2)
- C15% (4)
- D4% (1)
Why each option
The `renice` command is used to change the scheduling priority of an already running process, thereby minimizing its impact on system resources without terminating it.
The `renice` command modifies the nice value of a running process or process group, which in turn adjusts its scheduling priority, allowing the administrator to reduce its claim on CPU time and other resources. By increasing the nice value, the process becomes less prioritized by the kernel scheduler, making it less impactful on other system processes.
The `kill` command terminates a process, which would stop the script entirely rather than just minimizing its resource usage.
The `bg` command resumes a suspended process in the background or puts a foreground process into the background, but it does not directly manage its resource consumption.
The `nohup` command allows a command to continue running in the background even after the user logs out, but it does not modify the process's resource priority.
Concept tested: Managing process priority with nice/renice
Source: https://linux.die.net/man/1/renice
Topics
Community Discussion
No community discussion yet for this question.