lunes, 1 de agosto de 2016

renice command: Change the Priority of a Already Running Process

Q. I’d like alter / change the scheduling priority of running processes. How do I change the Priority of a already running process under CentOS Linux or any UNIX like operating systems?

A. If you run CPU-bond processes you must use nice command used to start process with modified scheduling priority / nicenesses. renice command is used tochange the priority of a process that’s already running.

nice command syntax:

The renice command changes the nice value of a process already running. It’s syntax is as follows:
renice {priority} pid
The following will change nice value of process 2243 to 19, enter:
# renice 19 2243
The following will change the priority of process ID’s 1024 and all processes owned by users vivek, enter:
# renice +1 1024 -u vivek
The following will change the priority of process ID’s 1024 and 66, and all processes owned by users daemon and root.
# renice +1 1024 -u daemon root -p 66
Please note that:
  1. Users can only change the nice value of processes which they own.
  2. User cannot start processes with nice values less than 20
  3. User cannot lower the nice values of their processes after they’ve raised them.
  4. As usual root has full access to renice command
For more details and options see renice command man page:
$ man renice

No hay comentarios:

Publicar un comentario