top- what negative priority means?

Shane Ambler FreeBSD at ShaneWare.Biz
Wed Dec 10 12:01:48 UTC 2014


On 10/12/2014 19:15, s m wrote:
> hello everybody
>
> i have problem with my FreeBSD9.2. my ssh connection becomes down after
> some minutes. i check top and see that sshd daemon is locked and has
> priority -100.
>
> 14610 root       1 -100    0 74196K  5860K *Linux  2   0:05  0.00% sshd

I wouldn't expect to see "*Linux" - that column is the state which is
normally something like uwait, select, kqread, zio, CPU0, CPU1....

> what priority -100 means? i googled a lot but found nothing.
>

The PRI column is the scheduling priority, an indication of what gets
cpu time first, high numbers mean use cpu when no-one else is using it,
negative numbers indicate get all the the cpu time you need.

See man nice - the NICE value is a user specified priority in the
range of 20 to -20 (limits are actually documented in man renice)
while the PRI value is the kernel assigned priority value.

I only guess that the kernel uses priority values greater than the
20 to -20 range used by nice.


-- 
FreeBSD - the place to B...Software Developing

Shane Ambler



More information about the freebsd-questions mailing list