Home > Computers & Tech > Detail
search_icon
Question

A developer calls you with a problem. He was trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. To ensure that the CPU gives preference to other processes, you need to lower the daemon's priority. The PID number is 2345. Which command would you use to decrease the daemon's priority

Answer

{"command":"renice -n -5 -p 2345"}

  • Q:What is the PID number for this daemon? A:The PID number is 2345.
  • Q:Which command can be used to decrease the priority of a process? A:The renice command can be used.
  • Q:What is the syntax for using the renice command? A:The syntax is 'renice [-n] priority -p pid'.
  • Q:What priority value should be used to decrease the priority of a process? A:A higher priority value should be used to decrease the priority of a process.
  • Q:What priority value should be used to give the daemon lower priority? A:A negative value should be used to give the daemon lower priority.
  • Q:What would be the complete command to decrease the priority of the daemon with PID 2345? A:The complete command would be 'renice -n -5 -p 2345'.