NICE(3) BSD Library Functions Manual NICE(3)NAME
nice -- set program scheduling priority
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
nice(int incr);
DESCRIPTION
This interface is obsoleted by setpriority(2).
The nice() function obtains the scheduling priority of the process from the system and sets it to the priority value specified in incr. The
priority is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling. Only a process
with appropriate privileges may lower priorities.
Children inherit the priority of their parent processes via fork(2).
RETURN VALUES
Upon successful completion, nice() returns the new nice value minus NZERO. Otherwise, -1 is returned, the process' nice value is not
changed, and errno is set to indicate the error.
ERRORS
The nice() function will fail if:
[EPERM] The incr argument is negative and the caller does not have appropriate privileges.
SEE ALSO nice(1), fork(2), setpriority(2), renice(8)STANDARDS
The nice() function conforms to X/Open Portability Guide Issue 4, Version 2 (``XPG4.2'').
HISTORY
A nice() syscall appeared in Version 6 AT&T UNIX.
BSD April 30, 2011 BSD
Check Out this Related Man Page
NICE(1) BSD General Commands Manual NICE(1)NAME
nice -- execute a utility with an altered scheduling priority
SYNOPSIS
nice [-n increment] utility [argument ...]
DESCRIPTION
nice runs utility at an altered scheduling priority. If an increment is given, it is used; otherwise an increment of 10 is assumed. The
super-user can run utilities with priorities higher than normal by using a negative increment. The priority can be adjusted over a range of
-20 (the highest) to 20 (the lowest).
Available options:
-n increment
A positive or negative decimal integer used to modify the system scheduling priority of utility.
DIAGNOSTICS
The nice utility shall exit with one of the following values:
1-125 An error occurred in the nice utility.
126 The utility was found but could not be invoked.
127 The utility could not be found.
Otherwise, the exit status of nice shall be that of utility.
COMPATIBILITY
The historic -increment option has been deprecated but is still supported in this implementation.
SEE ALSO csh(1), getpriority(2), setpriority(2), renice(8)STANDARDS
The nice utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
HISTORY
A nice utility appeared in Version 6 AT&T UNIX.
BUGS
nice is built into csh(1) with a slightly different syntax than described here. The form 'nice +10' nices to positive nice, and 'nice -10'
can be used by the super-user to give a process more of the processor.
BSD June 6, 1993 BSD
Man Page
14 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Hi Neo & All
first I'd like to congratulate you for the nice impressing and promissing service.
I'm waiting for new forums , like: Advanced Unix / Sun / Linux / Xwindows / CDE .
obiously not all question should be at the Unix for Dummies forum!
Keep up the good work,
Hezki (1 Reply)
hi, I'm completely new to FreeBds or unix in general, is there a really nice site to teach you the basic ommands to free BSD.
I don't know what to do. =( (3 Replies)
i read a book about this a couple of times and i still find it confusing.
they talking about when you increase a priority number, that decreases nice number. I really dont understand this.
I'm working on a solaris and linux red hat 7.2 system.
if anyone can explain this stuff to me in... (3 Replies)
Has anyone had any luck in using a newer Geforce card in BSD? I dont really care about 3d accel as of now, just trying to get X up with a standard 1024x768 display would be nice :rolleyes:
Never mind, just read on web that nvidea is planning on making drivers for fbsd now that the latest... (2 Replies)
Hi All,
Long question and possibly a very short answer....
At work we've just got a new 3rd party backup solution (Netvault by Bakbone -it's v. nice), and I'm currently setting up my UNIX clients as part of the backup schedule. It's just occurred to me that there may be certain files or... (4 Replies)
Anyone know where you can purchase a 5.1 cd set? IBM no longer ships this out and do not have a set. I have a burned copy, but would be nice to have the originals. I'd like to send my copies offsite for DR once i get an original set.
Thanks! (2 Replies)
Hi folks,
Hope you can help me. I have a process that is currently running at nice 20 and need it to run faster (-10?). How do I change the process using nice? I have the process number and thought it would be along the lines of;
nice -10 process_id
but it doesn't seem to like that. (1 Reply)
Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Hi all,
I have a running process that will spawn a large number of perl processes. How can I set that these all get spawned with a low priority nice value? I don't mind if all perl related processes take this level.
Note, the executing script is compiled and can not be altered at a code... (1 Reply)
Hi Everyone , have a nice
i would need a little help on this
i have file which contains blocks such as given below
<hgsdp:msisdn=923228719047,loc;
HLR SUBSCRIBER DATA
SUBSCRIBER IDENTITY
MSISDN IMSI STATE AUTHD
923228719047 410072110070614 CONNECTED ... (3 Replies)
Hi,
I have two identical 12 CPU HPUX machines, and I run the same processes on each that load the boxes fully.
top on one reports activity under the NICE (19%) and SYS (18%) columns, while top on the other reports 0% NICE and 16% SYS. What would cause NICE to be zero on one machine and not... (5 Replies)
Hello,
Some guy said to me that using the nice command to decrease the priority of a process is a myth, that the operating system corrects the priorities as the processes need cpu. Is this true? (4 Replies)