top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is nice value in Linux?

+3 votes
What is nice value in Linux?
posted Apr 2, 2014 by Harshita Dhaliwal

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

0 votes

value of nice ranges from -20 to 19.
Default value of it is 10.

answer Apr 2, 2014 by Vimal Kumar Mishra
0 votes

Nice value is the value that controls the priority of the process.This value is returned using nice () system call. The equation for using nice value is: Priority = (?recent CPU usage?/constant) + (base- priority) + (nice value) Only the administrator can supply the nice value.

answer Apr 3, 2014 by Saif Khanam
Similar Questions
–1 vote

from man crontab:

Step values can be used in conjunction with ranges. Following a range with / specifies skips of the number's value through the range. For example 0-23/2 can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after an asterisk, so if you want to say every two hours, just use */2

As an example, I see:

~# cat /etc/cron.d/leafnode 
# Cron entries for Leafnode.
# Run /etc/news/leafnode/do-fetch-news every hour.
8 * * * * news if [ -x /etc/news/leafnode/do-fetch-news ]; then /etc/news/leafnode/do-fetch-news; fi

now, every, let's say, two hours I want to run "killall fetchnews" because it has a tendency to stall. Would that look like:

#cron to kill defunct fetchnews
* */2 * * * killall fetchnews

(leaving out the logic of looking for a zombie process (if that's correct terminology))

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.