LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-11-2006, 11:14 AM   #1
beeblequix
Member
 
Registered: Oct 2005
Location: Tierra Firma, Earth
Distribution: Debian of course...
Posts: 196

Rep: Reputation: 30
process priority,nice -- small question regarding high/low priority values


http://www.samspublishing.com/articl...?p=101760&rl=1
This url explains most of my question about process priority. It tells me that nice has values ranging from -20(highest priority) to 19(lowest priority). It also mentions the regular process scheduled priority range from 0 to 99. BUT it doesn't tell me which is higher -- is 0 the highest priority or is 99? Dumb question, I know, but I can't assume it's along the same x axis as 'nice'. Ideas? URLs?

 
Old 10-11-2006, 11:22 AM   #2
beeblequix
Member
 
Registered: Oct 2005
Location: Tierra Firma, Earth
Distribution: Debian of course...
Posts: 196

Original Poster
Rep: Reputation: 30
Another question: why do these two commands (ps -el & top) list priorities differently?

me@mysles8server:~> ps -el|head -15
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
004 S 0 1 0 0 75 0 - 120 11df6a ? 00:00:11 init
006 S 0 2 1 0 -40 0 - 0 1106e0 ? 00:00:00 migration_CPU0
002 S 0 3 1 0 85 0 - 0 1099ee ? 00:00:00 kmcheck
002 S 0 4 1 0 75 0 - 0 123d56 ? 00:00:00 keventd
002 R 0 5 1 0 94 19 - 0 - ? 00:00:34 ksoftirqd_CPU0
022 S 0 6 1 0 75 0 - 0 1395c6 ? 00:42:11 kswapd
002 S 0 7 1 0 75 0 - 0 14a00a ? 00:00:00 bdflush
002 S 0 8 1 0 75 0 - 0 11df6a ? 00:00:13 kupdated
002 S 0 9 1 0 76 0 - 0 160eee ? 00:00:13 kinoded
002 S 0 56 1 0 83 0 - 0 1fd398 ? 00:00:00 mdrecoveryd
002 S 0 63 1 0 75 0 - 0 11df6a ? 00:00:01 kreiserfsd
002 S 0 86 1 0 60 -20 - 0 1099ee ? 00:00:00 lvm-mpd
002 S 0 106 1 0 75 0 - 0 8f1588 ? 00:00:00 kjournald
002 S 0 107 1 0 75 0 - 0 8f1588 ? 00:08:43 kjournald


me@mysles8server:~> top -b -n1|head -25


9:19am up 33 days, 22:13, 1 user, load average: 1.09, 1.21, 1.26
192 processes: 189 sleeping, 2 running, 1 zombie, 0 stopped
CPU states: 0.4% user, 0.4% system, 0.0% nice, 0.9% idle
Mem: 1290448K av, 1272476K used, 17972K free, 0K shrd, 60040K buff
Swap: 4048K av, 4048K used, 0K free 671736K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
10844 me 17 0 1100 1096 808 R 19.9 0.0 0:00 top
1 root 15 0 84 84 44 S 0.0 0.0 0:11 init
2 root 0K 0 0 0 0 SW 0.0 0.0 0:00 migration_CPU0
3 root 25 0 0 0 0 SW 0.0 0.0 0:00 kmcheck
4 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
5 root 34 19 0 0 0 RWN 0.0 0.0 0:34 ksoftirqd_CPU0
6 root 15 0 0 0 0 SW 0.0 0.0 42:11 kswapd
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 bdflush
8 root 15 0 0 0 0 SW 0.0 0.0 0:13 kupdated
9 root 16 0 0 0 0 SW 0.0 0.0 0:13 kinoded
56 root 23 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
63 root 15 0 0 0 0 SW 0.0 0.0 0:01 kreiserfsd
86 root 0 -20 0 0 0 SW< 0.0 0.0 0:00 lvm-mpd
106 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
107 root 15 0 0 0 0 SW 0.0 0.0 8:43 kjournald
245 root 20 0 0 0 0 SW 0.0 0.0 0:00 qethsoftd0018

Last edited by beeblequix; 10-11-2006 at 11:27 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very low priority question gerald45 Linux - General 2 10-10-2005 05:32 PM
Nice vs Priority, how do I prioritise a cronjob? stefaandk Linux - General 5 08-11-2005 09:17 PM
Sound Question - Low priority. karmazilla Linux - General 5 04-26-2005 12:51 PM
'nice' priority is working backwards! wapcaplet Linux - Software 5 11-19-2004 10:46 AM
high priority process? gongli Slackware 5 08-08-2003 02:03 PM


All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration