Sponsored Content
Full Discussion: nice and renice
Operating Systems AIX nice and renice Post 302675899 by admin_xor on Monday 23rd of July 2012 06:01:15 PM
Old 07-23-2012
From the output, I see PID 240103 has lower priority (39) than that of PID 240001 (60). The greater the priority, the lower the nice value. I think what you actually should want to be doing is to decease the priority by bumping up the nice value for PID 240001to match up PID 240103.

To calculate the exact value of nice for priority 39, you still need to see man pages.
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Very Nice

Just a quick message to say great work to Neo and any others who have helped with the upgrade - the layout, appearance and functionality of this forum ROCKS. By far the best I have seen. Excellent! (1 Reply)
Discussion started by: alwayslearningunix
1 Replies

2. UNIX for Dummies Questions & Answers

Please Help Me With This Nice And Renice Stuff

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)
Discussion started by: TRUEST
3 Replies

3. 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

4. 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

5. UNIX for Advanced & Expert Users

recursive nice value

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)
Discussion started by: nhatch
1 Replies

6. HP-UX

top and nice

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)
Discussion started by: CBorgia
5 Replies

7. Shell Programming and Scripting

Need a nice logic

Hi all, Given a scenario there is a folder and files will be coming into the folder at random time.The files that came in need to be mailed. And an important thing no file should be missed out as well as no file should be sent twice. One idea is that we can schedule a script that runs for... (2 Replies)
Discussion started by: kannangce
2 Replies

8. 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

9. 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
nice(2) 							   System Calls 							   nice(2)

NAME
nice - change priority of a process SYNOPSIS
#include <unistd.h> int nice(int incr); DESCRIPTION
The nice() function allows a process to change its priority. The invoking process must be in a scheduling class that supports the nice(). The nice() function adds the value of incr to the nice value of the calling process. A process's nice value is a non-negative number for which a greater positive value results in lower CPU priority. A maximum nice value of (2 * NZERO) -1 and a minimum nice value of 0 are imposed by the system. NZERO is defined in <limits.h> with a default value of 20. Requests for values above or below these limits result in the nice value being set to the corresponding limit. A nice value of 40 is treated as 39. Calling the nice() function has no effect on the priority of processes or threads with policy SCHED_FIFO or SCHED_RR. Only a process with the {PRIV_PROC_PRIOCNTL} privilege can lower the nice value. RETURN VALUES
Upon successful completion, nice() returns the new nice value minus NZERO. Otherwise, -1 is returned, the process's nice value is not changed, and errno is set to indicate the error. ERRORS
The nice() function will fail if: EINVAL The nice() function is called by a process in a scheduling class other than time-sharing or fixed-priority. EPERM The incr argument is negative or greater than 40 and the {PRIV_PROC_PRIOCNTL} privilege is not asserted in the effective set of the calling process. USAGE
The priocntl(2) function is a more general interface to scheduler functions. Since -1 is a permissible return value in a successful situation, an application wishing to check for error situations should set errno to 0, then call nice(), and if it returns -1, check to see if errno is non-zero. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
nice(1), exec(2), priocntl(2), getpriority(3C), attributes(5), privileges(5), standards(5) SunOS 5.11 1 Apr 2004 nice(2)
All times are GMT -4. The time now is 05:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy