Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nice(2) [v7 man page]

NICE(2) 							System Calls Manual							   NICE(2)

NAME
nice - set program priority SYNOPSIS
nice(incr) DESCRIPTION
The scheduling priority of the process is augmented by incr. Positive priorities get less service than normal. Priority 10 is recommended to users who wish to execute long-running programs without flak from the administration. Negative increments are ignored except on behalf of the super-user. The priority is limited to the range -20 (most urgent) to 20 (least). The priority of a process is passed to a child process by fork(2). For a privileged process to return to normal priority from an unknown state, nice should be called successively with arguments -40 (goes to priority -20 because of truncation), 20 (to get to 0), then 0 (to maintain compatibility with previous versions of this call). SEE ALSO
nice(1) ASSEMBLER
(nice = 34.) (priority in r0) sys nice NICE(2)

Check Out this Related Man Page

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
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

MAX OS X and GCC Compiler - From the Apple Store!

FYI, the GCC compiler is available for OS X. This means you can easily compile all the super GCC opensource. You can see the GCC and other projects <A HREF=http://www.opensource.apple.com//projects/darwin/1.2/projects.html>HERE</A>.<P> Also, I looked into how OS X handles OS 9 applications. ... (12 Replies)
Discussion started by: Neo
12 Replies

2. UNIX for Dummies Questions & Answers

Mac OSX question

Hi. Is it possible to execute a Cocoa (or Carbon or eaven a classic) program for mac OSX in the terminal window? OSX finder can sometimes be so busy that it wont respond for several minutes, ie if you are uploading a very big file/files to a afp server. Then it would have been nice to start... (7 Replies)
Discussion started by: nicke30
7 Replies

3. UNIX for Dummies Questions & Answers

UNIX Scripting

:confused: I need to find a place or places on the Internet where I can find UNIX scripts to view and to modify to make life easy on the UNIX environment. Can someone help me on this. Thanks (7 Replies)
Discussion started by: wolf
7 Replies

4. UNIX for Dummies Questions & Answers

Here Doc (I think!)

Can someone explain to me how a here doc works. I thought it was something like this <<EOF command command command EOF What I am trying to do is put a ftp commands into my shell script, and I've been told that I need to use a here doc for it. Can anybody shed some light on this... (6 Replies)
Discussion started by: cfoxwell
6 Replies

5. UNIX for Dummies Questions & Answers

Toshiba laptop

I am trying to install mandrake 8.0 on my Satellite Pro 4600. I have got it installed but I am having problems with X windows. The laptop has a trident cyber blade video card I have it set to 1024x768 resolution Basically everytime I start x it appears in the upper right to middle of the screen... (6 Replies)
Discussion started by: gennaro
6 Replies

6. UNIX for Dummies Questions & Answers

System Administration

I have been working with UNIX (HP-UX) now for a couple of years. Have become quite capable in shell scripting and general UNIX use. The local university offers a certification course in UNIX administration which I am considering taking. However, the certification is geared toward UNIX in general... (13 Replies)
Discussion started by: google
13 Replies

7. UNIX for Dummies Questions & Answers

nicely formatted directory listing from batch ssh session

Hi, I am really struggling to finish of a script I have been assigned. The script's purpose is to log on to each server defined in an array, determine the Web Server version, and list the directory beneath the installation directory. In my case, this installation directory is almost always... (6 Replies)
Discussion started by: grebbux
6 Replies

8. Linux

TuxOnIce stalls 3 times before resuming

I am having trouble resuming from hibernation using TuxOnIce method. The thing works, but in a very strange manner. Here's how it looks: 1. Computer boots and finds resume image and starts resume. It reads image from disk (takes ~10 seconds) Reading kernel & process data... Atomic restore.... (8 Replies)
Discussion started by: lockheed
8 Replies

9. Shell Programming and Scripting

ps aux + grep + nice + while

Hi again, well does anyone knows how can i grep a process that right know the only part of the process name that i know is "backup" then renice it if the cpu consumption is more then 90% ... for now i have : a=$(ps aux | grep -c backup ) while $a > 2 #pseudo code do if ; then #... (16 Replies)
Discussion started by: drd0spt
16 Replies

10. Linux

Determining Values for NIce and Priority items in limits.conf file

I've been looking online trying to find the correct value nice and priority can take in the limits.conf file. ON the man page it says; Does this mean priority can be any negative number and any positive? Then Does this mean any number between -20 and 19 also what does the definition of nice... (13 Replies)
Discussion started by: matthewfs
13 Replies

11. Shell Programming and Scripting

awk one liners into a nice script

Hi All, I got some awk one liners, how can i split it all into a nice script? Got these: gzcat capgw0.log-201308161376632741.gz | sed -n '/2013-08-16 05:56:/,/2013-08-16 05:58:/p' > timebased.log awk -F":|," 'FNR==NR && /INFO - AId:/ {a=$0;next} END {for (i in a) print i "|" a}'... (8 Replies)
Discussion started by: batka
8 Replies

12. BSD

Very high nice percentage in top command

Hello Folks, Recently our FreeBSD 7.1 i386 system became very sluggish. Nothing much is happening over there & whatever is running takes eternity to complete. All the troubleshooting hinted towards a very high nice percentage. Can that be the culprit? Pasting snippets of top command,... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

13. What is on Your Mind?

A nice YT video on A.I

Hello All, Just went through a nice YT video of A.I Age of A.I YT video See who is the host of this video :) if you are a Hollywood fan(a bit spoiler) I hope to learn something of it someday, technology is really growing day by day, cheers. Thanks, R. Singh (8 Replies)
Discussion started by: RavinderSingh13
8 Replies