Re: kernel 100% CPU
Date: Sun, 03 Sep 2023 07:56:32 UTC
On 02/09/2023 18:31, Mateusz Guzik wrote: > Looks like you have a lot of unrelated traffic in there. > > Run this script: > #pragma D option dynvarsize=32m > > profile:::profile-997 > /execname == "find"/ > { > @oncpu[stack(), "oncpu"] = count(); > } > > /* > * The p_flag & 0x4 test filters out kernel threads. > */ > > sched:::off-cpu > /execname == "find"/ > { > self->ts = timestamp; > } > > sched:::on-cpu > /self->ts/ > { > @offcpu[stack(30), "offcpu"] = sum(timestamp - self->ts); > self->ts = 0; > } > > dtrace:::END > { > normalize(@offcpu, 1000000); > printa("%k\n%s\n%@d\n\n", @offcpu); > printa("%k\n%s\n%@d\n\n", @oncpu); > } > > dtrace -s script.d -o out # pwd /home/grahamperrin/Documents/IT/BSD/FreeBSD/kernel-cpu # ./2023-09-02-18-31.sh ./2023-09-02-18-31.sh: profile:::profile-997: not found ./2023-09-02-18-31.sh: /execname: not found ./2023-09-02-18-31.sh: 6: Syntax error: "(" unexpected (expecting "}") # whoami root # echo $ $ # echo $0 sh # echo $SHELL /bin/csh # exit root@mowa219-gjp4-8570p-freebsd:/home/grahamperrin/Documents/IT/BSD/FreeBSD/kernel-cpu #