cpu load计算
	查看:cat /proc/loadavg :1m 5m 15m nr_running()/total_threads last_thread
	计算:每5秒钟采样,计算running和uninterrupted个数,指数滤波,存储
	
	分析:procs_blocked好像不准  watch "grep procs /proc/stat; cat /proc/loadavg;pcs=\$(ps -eTl |grep -v -E '^[0-9] S ');echo \"\$pcs\" |grep -E '^[0-9] R' |wc -l ; echo \"\$pcs\" |grep -E '^[0-9] D' |wc -l ;echo \"\$pcs\" "
	
	sysak 分析脚本,可以统计runable/uninterrupted wait(disk wait)线程数
	curl -O https://gitee.com/iamgd67/sysak/raw/opensource_branch/source/tools/combine/loadtask/loadtask.sh
	bash loadtask.sh
	
	查看线程状态和所属cpu
	ps -eLO psr
	
* calc_load - given tick count, ι
* This is called while holding a
*
static inline void calc_load(unsi
{
unsigned long active_task
static int count = LOAD_
count -= ticks;
if (count < 0) { count += LOAD_FRE active_tasks = CO CALC_LOAD(avenrur CALC_LOAD(avenrur CALC_LOAD(avenrur } static unsigned long count_active { return nr_active() * FIXE } #define LOAD_FREQ (5*HZ) #define EXP_1 1884 #define EXP_5 2014 #define EXP_15 2037 
	cpu usage
	应该是从 /proc/stat 获取各种时间的累计值,然后计算百分比
	
	
	参考:
	load计算:
	https://blog.csdn.net/weixin_34223655/article/details/92562329
	https://wiki.nix-pro.com/view/Load_average_explained
	
	多核任务balance
	https://blog.csdn.net/code_lyb/article/details/128048254
	https://cloud.tencent.com/developer/article/1449436
	https://en.wikipedia.org/wiki/Run_queue
	
	idle说明
	https://www.kernel.org/doc/html/v5.0/admin-guide/pm/cpuidle.html
	https://en.wikipedia.org/wiki/Idle_(CPU)
	
	
	0,1,2号进程
	https://blog.csdn.net/m0_47696151/article/details/121947320
	https://www.cnblogs.com/alantu2018/p/8526970.html 
	
	cpu load高而idle也高(即cpu使用率不高,包括io wait也不高),可能原因是小任务太多,排队数较多但能很快消下去,经过采样和平均,load可能比较高。
	可能vmstat 1看到load始终大于核数,但还有较大idle%的情况,可能是任务在多核间分配不均,部分核有>1任务,部分核空闲