Re: Kernel is using a lot of CPU (was: Re: test)

From: Mike Karels <mike_at_karels.net>
Date: Mon, 30 Jan 2023 13:27:16 UTC
On 30 Jan 2023, at 5:03, Nikos Vassiliadis wrote:

>> Hi,
>>
>> I just rebooted a system of mine and it seems that the kernel is constantly doing something. How could I debug this?
>> I am thinking of rebooting it tonight
>>
>> root@aurora:~ # top -S -b
>> last pid:  2196;  load averages:  1.00,  1.00,  1.00  up 0+01:54:34    12:41:35
>> 72 processes:  2 running, 69 sleeping, 1 waiting
>> CPU:  0.0% user,  0.0% nice, 24.6% system,  0.0% interrupt, 75.3% idle
>> Mem: 46M Active, 171M Inact, 1429M Wired, 14G Free
>> ARC: 919M Total, 354M MFU, 487M MRU, 6912K Anon, 8726K Header, 63M Other
>>      234M Compressed, 610M Uncompressed, 2.60:1 Ratio
>> Swap: 16G Total, 16G Free
>>
>>   PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
>>    11 root          4 155 ki31     0B    64K RUN      0 345:06 314.31% idle
>>     0 root         49 -16    -     0B   784K swapin   1 112:27  99.85% kernel
>>    30 root        319 -16    -     0B  5120K spa->s   3   0:06   0.00% zpool-aurora-os
>>  1157 root          1  20    0   176M   150M select   2   0:05   0.00% smbd
>>  1154 root          1  20    0   175M   150M select   2   0:05   0.00% smbd
>>
>> This is a 12.4-RELEASE system.
>>
>> Thanks for any ideas,
>> Nikos
>>
>>
>>
>
> Sending the email again with the correct subject

You could add -H to the top command, which will show kernel threads within
the kernel process.

		Mike