Operating System - HP-UX
1752783 Members
5788 Online
108789 Solutions
New Discussion

Re: Question about NICE CPU percentage in top command.

 
mpua
Frequent Advisor

Question about NICE CPU percentage in top command.

Hi,

 

We've got a HP-UX 11.23 server in which the top command output have been a little bit weird during the last few days. I'm speaking about the NICE column in top output, which is consistently at about 11 -15% when it used to be zero all the time:

 

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.55 28.0% 5.8% 8.1% 58.1% 0.0% 0.0% 0.0% 0.0%
1 0.55 9.7% 18.3% 6.5% 65.5% 0.0% 0.0% 0.0% 0.0%
2 0.54 41.1% 4.0% 6.0% 49.0% 0.0% 0.0% 0.0% 0.0%
3 0.60 35.4% 0.8% 3.2% 60.6% 0.0% 0.0% 0.0% 0.0%
5 0.54 18.2% 46.3% 2.8% 32.7% 0.0% 0.0% 0.0% 0.0%
7 0.52 22.4% 8.3% 4.0% 65.3% 0.0% 0.0% 0.0% 0.0%
8 0.54 20.0% 11.9% 3.8% 64.3% 0.0% 0.0% 0.0% 0.0%
9 0.54 14.1% 23.8% 4.4% 57.7% 0.0% 0.0% 0.0% 0.0%
10 0.55 46.2% 1.2% 3.0% 49.6% 0.0% 0.0% 0.0% 0.0%
12 0.57 35.3% 13.7% 4.2% 46.8% 0.0% 0.0% 0.0% 0.0%
14 0.53 22.6% 12.9% 11.1% 53.4% 0.0% 0.0% 0.0% 0.0%
15 0.52 29.2% 27.2% 4.8% 38.9% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.54 26.8% 14.5% 5.2% 53.5% 0.0% 0.0% 0.0% 0.0%

 

 

What could be the cause of this? Is it a symptom of something bad going on in the system?

 

Regards.

2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: Question about NICE CPU percentage in top command.

The NICE cpu usage indicates that you have processes running with a non-default nice value.  If you look in the process list for top and check the (NI)ce column, you would normally see values of 20, which is the system default.  In your case you may see other values.  

 

How those process utilize CPU depends on their nice value.  If it is higher than 20 then they are "more nice" (nicer?) when getting CPU time.  If the value is less than 20 then they are less nice and may utilize more than their usual share of CPU.

 

Have a look at the nice(1) man page for a more thorough explanation.

 

# man 1 nice

Dennis Handly
Acclaimed Contributor

Re: Question about NICE CPU percentage in top command.

>Is it a symptom of something bad going on in the system?

 

No, nice is typically a good thing.  I means that the process is usually running at a lower priority.

 

If you changed things to add the nice(1) command to your scripts, this could happen.

Or if you used "set -o bgnice" then all background processes, started with "&", would be niced.