运行队列中进程排查方法
ps r -Aps -o comm,pid,ppid,user,time,etime,start,pcpu,state --sort=comm aH | grep '^COMMAND\|R$'ps awwlx --sort=vszF UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
1 0 2 0 20 0 0 0 kthrea S ? 0:00 [kthreadd]
1 0 3 2 -100 - 0 0 migrat S ? 0:02 [migration/0]
1 0 4 2 20 0 0 0 ksofti S ? 0:48 [ksoftirqd/0]
1 0 5 2 -100 - 0 0 cpu_st S ? 0:00 [migration/0]
...cat /proc/sched_debug | grep -A1 cpu# | sed -n '/cpu/{N;s/\n/,/;p}' | sed -r 's/ +/ /g' | sort -k6,6nr |head -5 && cat /proc/loadavg参考
Last updated