nerdexam
CompTIA

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.

System Management

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)
  • A
    73% (19)
  • B
    8% (2)
  • C
    15% (4)
  • D
    4% (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.

AreniceCorrect

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.

Bkill

The `kill` command terminates a process, which would stop the script entirely rather than just minimizing its resource usage.

Cbg

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.

Dnohup

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

#Process Management#Resource Management#renice command#System Performance

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice