NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: What is the "[system]" process representing ?



On Tue, 4 Oct 2016, Michael van Elst wrote:
> [system] is all the kernel threads. In top you can switch to thread 
> display and get more details. Kernel threads are also displayd with 'ps 
> -s' and you can augment the display with the thread name using '-o 
> lname'.

Ah, I should have known there would be a switch for 'ps' since there is on 
several other OS's including Linux. However, IIRC, Linux will show all the 
threads by default. Thanks for the reminder. 

> 80% CPU for doing nothing however is bad. The top display probably tells 
> you which thread is misbehaving.

Next time it happens, I'll pay attention and expand the kernel threads to 
see which one is doing it. I guess there is no way to do a gdb 'attach' to 
the kernel thread to get a backtrace, though. I'm assuming one has to do 
this sort of thing with a specialized kernel debuggger/profiler.

> Saying this, if you run a kernel with LOCKDEBUG on a system with lots of 
> memory, this adds a ton of overhead to the ioflush function and then 
> it's not impossible to see a continous 80% CPU usage for '[system]'. But 
> that doesn't happen with normal kernels.

This is definitely abnormal in my experience. I have machines with less 
horsepower and they don't have the issue. It's got to be something 
specific to my configuration or hardware on that one machine. I'll run it 
to ground eventually, and especially now that I'll remember to drill down 
to the actual thread in question. I can then put in enough printf()'s or 
printk()'s that I can find the general problem area enough to report it. 

> top just can't display CPU usage correctly for processes that are active 
> for very short intervals, wether kernel threads or not.

Well sure, it's default refresh is 5 seconds, so by definition if it's 
shorter than that, it'll basically be invisible.

Thanks for the reply. 
-Swift


Home | Main Index | Thread Index | Old Index