Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to alter the priority of running processes

Answer:

The basic syntax is as the following

renice {priority} pid

Where priority range from -20 to 19 (lowest priority)

For example, to set the priority of pid 755 to -19, try

sudo renice 19 755

If you want to set by process name instead of pid, you can use

sudo renice 19 `pgrep apache2`

Where apache2 is the process name you want to set.

  1. Best way to kill all child processes forked by a given program
  2. How to make shell script run in low priority
  3. Find the process ID of a running program
  4. List processes by memory usage
  5. Display the top 10 processes used up the most of the memory

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>