Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Please Help Me With This Nice And Renice Stuff Post 21865 by Kelam_Magnus on Thursday 23rd of May 2002 06:38:38 PM
Old 05-23-2002
Let me help.


There are 2 commands nice and renice. First of all, nice is only used when you want to change the default priority level of the process that you are initiating. On all flavors of unix there is a default priority level for Users and for Root. I believe this can be modified, but I wouldn't mess with that. use renice instead.

Nice is used only at the time you kick off a script or a command from the command line to set the priority to something other than the default setting which is usually somewhere in the middle of the priority range. For some systems it is from +20 to -20. so the default could be around +10 for users and +-0 for Root.

Renice is only used when a process is running to change the priority level up or down.

Now, when you change the priority, A higher number is a lower priority. A lower number is a higher priority. Just think of the game of golf. lower is faster, better.

Hope this helps.


Smilie
 

7 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

weird stuff

I coudln't think of another topic to post this under as the OS on the system is XP pro. Ok here is the go. I'm upgrdaing a mates computer. A AMD 1200Mhz and well it wouldn't boot from the CD to do a fresh install (By upgrade I mean OS with complete new install). So I opened up the box and... (4 Replies)
Discussion started by: woofie
4 Replies

2. UNIX for Dummies Questions & Answers

Renice job

Hi everyone, I am working on a server that there is a rule to renice your jobs if they exceed 1 hour of running. I wrote a script that calls a program that runs for some thousand times. When I do 'top' I can see in the processes the program running but not the name of my script that I run... (1 Reply)
Discussion started by: Farsinos
1 Replies

3. Programming

nice command and nice() system call

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)
Discussion started by: tejbuch
2 Replies

4. Shell Programming and Scripting

A schoolboyish stuff

Hi , This is a pretty simple sed command i found when i was checking out one of the codes of my colleague . sed -e 's/\*.*\) \(\ <1*e\ >\) \(*.*\)/\2/' When i tried this on a few text files it was displaying the entire line. If this was to display entire line why sweat out on a sed . Does... (3 Replies)
Discussion started by: kinny
3 Replies

5. AIX

nice and renice

hello , We would like to increase the priority of the oracle process . Process(240001 ) should get the priority like the process(240103 ). Am not sure what value i should mention in the renice command(aix 6.1). Please assist me. 240001 A oracle 26804312 1 0 60 20... (2 Replies)
Discussion started by: gowthamakanthan
2 Replies

6. Shell Programming and Scripting

Renice command with input argument as a file

Hi all could you help me how to give pids in a file as an argument to renice command. Thanks in Advance.. :) Pradeep (4 Replies)
Discussion started by: nanz143
4 Replies

7. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 Replies
RENICE(8)						    BSD System Manager's Manual 						 RENICE(8)

NAME
renice -- alter priority of running processes SYNOPSIS
renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...] DESCRIPTION
Renice alters the scheduling priority of one or more running processes. The following who parameters are interpreted as process ID's, process group ID's, or user names. Renice'ing a process group causes all processes in the process group to have their scheduling priority altered. Renice'ing a user causes all processes owned by the user to have their scheduling priority altered. By default, the processes to be affected are specified by their process ID's. Options supported by renice: -g Force who parameters to be interpreted as process group ID's. -u Force the who parameters to be interpreted as user names. -p Resets the who interpretation to be (the default) process ID's. For example, renice +1 987 -u daemon root -p 32 would change the priority of process ID's 987 and 32, and all processes owned by users daemon and root. Users other than the super-user may only alter the priority of processes they own, and can only monotonically increase their ``nice value'' within the range 0 to PRIO_MAX (20). (This prevents overriding administrative fiats.) The super-user may alter the priority of any process and set the priority to any value in the range PRIO_MIN (-20) to PRIO_MAX. Useful priorities are: 20 (the affected processes will run only when nothing else in the system wants to), 0 (the ``base'' scheduling priority), anything negative (to make things go very fast). FILES
/etc/passwd to map user names to user ID's SEE ALSO
getpriority(2), setpriority(2) BUGS
Non super-users can not increase scheduling priorities of their own processes, even if they were the ones that decreased the priorities in the first place. The Linux kernel (at least version 2.0.0) and linux libc (at least version 5.2.18) does not agree entierly on what the specifics of the sys- temcall interface to set nice values is. Thus causes renice to report bogus previous nice values. HISTORY
The renice command appeared in 4.0BSD. 4th Berkeley Distribution June 9, 1993 4th Berkeley Distribution
All times are GMT -4. The time now is 06:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy