LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Manual Pages (man) >

nice

run a program with modified scheduling priority


  1. nice.1.man
  2. nice.2.man


1. nice.1.man

Manpage of NICE

NICE

Section: User Commands (1)
Updated: October 2011
Index Return to Main Contents
 

NAME

nice - run a program with modified scheduling priority  

SYNOPSIS

nice [OPTION] [COMMAND [ARG]...]  

DESCRIPTION

Run COMMAND with an adjusted niceness, which affects process scheduling. With no COMMAND, print the current niceness. Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).

-n, --adjustment=N
add integer N to the niceness (default 10)
--help
display this help and exit
--version
output version information and exit

NOTE: your shell may have its own version of nice, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.  

AUTHOR

Written by David MacKenzie.  

REPORTING BUGS

Report nice bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report nice translation bugs to <http://translationproject.org/team/>  

COPYRIGHT

Copyright © 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  

SEE ALSO

nice(2)

The full documentation for nice is maintained as a Texinfo manual. If the info and nice programs are properly installed at your site, the command

info coreutils aqnice invocationaq

should give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

This document was created by man2html using the manual pages.
Time: 17:31:52 GMT, October 23, 2013

2. nice.2.man

Manpage of NICE

NICE

Section: Linux Programmer's Manual (2)
Updated: 2007-07-26
Index Return to Main Contents
 

NAME

nice - change process priority  

SYNOPSIS

#include <unistd.h>

int nice(int inc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nice(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE  

DESCRIPTION

nice() adds inc to the nice value for the calling process. (A higher nice value means a low priority.) Only the superuser may specify a negative increment, or priority increase. The range for nice values is described in getpriority(2).  

RETURN VALUE

On success, the new nice value is returned (but see NOTES below). On error, -1 is returned, and errno is set appropriately.  

ERRORS

EPERM
The calling process attempted to increase its priority by supplying a negative inc but has insufficient privileges. Under Linux the CAP_SYS_NICE capability is required. (But see the discussion of the RLIMIT_NICE resource limit in setrlimit(2).)
 

CONFORMING TO

SVr4, 4.3BSD, POSIX.1-2001. However, the Linux and (g)libc (earlier than glibc 2.2.4) return value is nonstandard, see below. SVr4 documents an additional EINVAL error code.  

NOTES

SUSv2 and POSIX.1-2001 specify that nice() should return the new nice value. However, the Linux syscall and the nice() library function provided in older versions of (g)libc (earlier than glibc 2.2.4) return 0 on success. The new nice value can be found using getpriority(2).

Since glibc 2.2.4, nice() is implemented as a library function that calls getpriority(2) to obtain the new nice value to be returned to the caller. With this implementation, a successful call can legitimately return -1. To reliably detect an error, set errno to 0 before the call, and check its value when nice() returns -1.  

SEE ALSO

nice(1), renice(1), fork(2), getpriority(2), setpriority(2), capabilities(7)  

COLOPHON

This page is part of release 3.32 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
NOTES
SEE ALSO
COLOPHON

This document was created by man2html using the manual pages.
Time: 17:31:52 GMT, October 23, 2013

cs - ENGLISH - ENGLISH - ENGLISH - ja - nl - pl - ENGLISH

Meet new people