07-14-2009
Jim is absolutely correct. Additionally keep in mind that priorities are relative numbers. There are only so many CPU ticks to distribute among processes and if every process has a high priority then every one might get the same amount as if every process has a low priority, as far as these priorities are equal.
I hope this helps.
bakunin
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can someone tell me .. how to find a user & process who has executed nice (scheduled priority) to one of his process. .Tks.. (5 Replies)
Discussion started by: sivan
5 Replies
2. UNIX for Advanced & Expert Users
Under, Solaris 10 I have the following problem:
A script executed at command line runs with nice level 0, as expected.
Same script started under (user) crontab runs with nice level 2.
I would prefer it run at 0. Is this possible? If so, how?
Thanks. (0 Replies)
Discussion started by: henrydark
0 Replies
3. UNIX for Dummies Questions & Answers
Can someone tell me this. thanks (1 Reply)
Discussion started by: xoxouu
1 Replies
4. Programming
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 Dummies Questions & Answers
hello everybody:
I have some job running on tru64 system and Im the root, due to limited resources I end up with my job ( vdump) for example taking the lowest share, I researched the nice command on the net, but couldnt get enough info, can I use it to already running process or I only use it... (1 Reply)
Discussion started by: aladdin
1 Replies
6. Shell Programming and Scripting
Hello,
I am just starting with shell scripting, as everyone will soon see from my question. What I'm trying to do is call the Nice command to set the script process priority from /bin/ksh. The difference is I'm running it not directly through the shell, but through Bigfix (very similar to... (3 Replies)
Discussion started by: solly119
3 Replies
7. Shell Programming and Scripting
Dear Friends,
I have a directory when i take du of that directory it takes alot of memory and cpu and I/O, i want to use nice to run my script that have du command slowly so it won't take I/O and cpu, please suggest. (6 Replies)
Discussion started by: learnbash
6 Replies
8. BSD
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
9. Shell Programming and Scripting
with using wall command, how can i have a carriage return in my broadcast message. i try to broadcast from a file, i were to use "cat myfile | wall" for broadcasting. but when the message broadcast somehow the format run away.
this the text in my file:
line 1
line 2
line 3
when broadcast
... (3 Replies)
Discussion started by: lsy
3 Replies
nice(3) Library Functions Manual nice(3)
Name
nice - set program priority
Syntax
int nice(incr)
int 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 flack 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 For a privileged process to return to normal priority from an unknown state,
should be called successively with arguments -40 (goes to priority -20 because of truncation), 20 (to get to 0), then 0 (to maintain com-
patibility with previous versions of this call).
Environment
In any mode, nice returns -1 and sets on an error. On success, the return value depends on the mode in which your program was compiled.
In POSIX or System V mode, it is the new priority; otherwise, it is zero. Note that, in POSIX and System V mode, -1 can indicate either
success or failure; must be used to determine which.
See Also
nice(1), fork(2), setpriority(2), renice(8)
nice(3)