GNU/Linux Command – NICE

nice — Run a command with modified priority.

Summary:

GNU/Linux is a multi-user and multi-tasking OS. So many processes will be running with some scheduling policy like Round Rabin, FIFO etc.. High priority process will get more CPU Time. nice command is used to run the given command with its scheduling priority adjusted. Priority range goes from -20 (Highest priority) to 19 (Lowest priority).

Examples:
$ nice -- Prints the current priority value. $ nice ls -- Increment the priority value of the ls command by 10 (Default value) and run. $ nice -n 5 ls -- Increment the priority value of the ls command by 5 and run. # nice -n -2 ls -- Decrement the priority value of the ls commandby -2 and run.
NOTE: Incrementing the priority value will reduce the priority level and vice versa. Priority range is -20 (High) to 19 (Low).

Read: man nice

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: