1848655 Members
6088 Online
104035 Solutions
New Discussion

NICE, top & sar

 

NICE, top & sar

Hello !
What does "NICE" column mean in an output of "top" command ? Unfortunatelly, "man top" doesn't explain it. I'm talking about "nice" in CPU characteristics not in processes' ones.
Furthermore, I would know how this values correlate with CPU characteristics gathered by "sar" command. My K370 with HP-UX 11.00.
Thanks for advance.
4 REPLIES 4
Mark Greene_1
Honored Contributor

Re: NICE, top & sar

NICE is a relative value for assigning priority. The number is not an actual count of anything, just a way of stating whether any one process has a higher, lower, or same priority as any other process. There's no direct correlation to the percentages in sar, vmstat, iostat, glance, etc.

The default nice value is 20. Lower numbers get higher CPU priority, hihger numbers get lower priority. I don't know why the values work this way other than it's always been like that since AT&T was still distributing Unix to Universities.


Man nice for more info.


mark
the future will be a lot like now, only later
Jean-Luc Oudart
Honored Contributor

Re: NICE, top & sar

check this previous thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=115252

Rgds,
Jean-Luc
fiat lux

Re: NICE, top & sar

Thanks, but perhaps You understood me wrong. I know what is 'nice' and how unix schedules processes. I put top screen below. I mean "NICE" column in "Cpu states". You wrote about "NI" column wich describes process characteristics. Occasionally I see high persentage in this column and my system is very slow. But CPU statistics gathered by sar (sar -M) look usual.

4lSystem: hp9k Wed Nov 19 08:48:14
2003
Load averages: 0.38, 0.42, 0.34
159 processes: 155 sleeping, 4[4h2[4l
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.18 4.8% 0.0% 3.6% 91.7% 0.0% 0.0% 0.0% 0.0%
1 0.25 0.8% 0.0% 1.8% 97.4% 0.0% 0.0% 0.0% 0.0%
2 0.61 3.0% 0.0% 5.2% 91.8% 0.0% 0.0% 0.0% 0.0%
3 0.37 1.0% 0.0% 5.6% 93.4% 0.0% 0.0% 0.0% 0.0%
4 0.38 6.4% 0.0% 1.6% 92.0% 0.0% 0.0% 0.0% 0.0%
5 0.51 5.6% 0.0% 5.4% 89.1% 0.0% 0.0% 0.0% 0.0%
--- ---- -[4b -[4b -[4b -[4b -[4b -[4b -[4b -----
avg 0.38 3.6% 0.0% 4.0% 92.5% 0.0% 0.0% 0.0% 0.0%

Memory: 610844K (192544K) real, 778864K (229820K) virtual, 192208K free
Page# 1
/20

CPU TTY h[4l NAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 13739 oracle 154 20 36032K 3336K sleep 109:57 19.04 19.01
oracleSID1
4 ? 28509 oracle 154 20 36032K 3816K sleep 1:06 13.84 13.82
oracleSID1
0 ? 11153 oracle 156 20 36032K 3288K sleep 101:28 12.89 12.87
ora_ckpt_SI
4 ? 28590 oracle 154 20 36032K 3796K sleep 0:23 9.27 9.25
oracleSID1
2 ? 28342 root [4b148 20 1836K 448K sleep 1:59 4.55 4.55
vbdaleSID1
2 ? 28198 root [4b154 20 1836K 448K sleep 4:51 3.94 3.93 vbda
3 ? 28521 root [4b154 20 1836K 448K sleep 0:28 3.83 3.82 vbda
Alzhy
Honored Contributor

Re: NICE, top & sar

man nice o rman renice.
Hakuna Matata.