
定位Codebuddy消耗资源最大的几个程序ps-eopid,pcpu,rss,etime,args--sort-rss\|grep-Ecodebuddy|\.codebuddy-server\|grep-vgrep\|awk{ # 提取 --type 后面的值 type(server-main); for(i1;iNF;i) if($i ~ /^--type/){ sub(--type,,$i); type$i; break } printf PID%-8s CPU%-5s%% RSS%-7.0fMB UP%-12s TYPE%s\n, $1, $2, $3/1024, $4, type }\|sort-k4-t-nr示例输出kill 掉 TYPEfileWatcher 的程序让它重启kill 23597 不能kill -9