打印一次所有进程情况
top -b -n 1
忽略前面8行
tail -n +8
统计
top -b -n 1 \
|awk '{print $10}'\
|tail -n +8 \
|xargs -i echo "{} +" \
|xargs -r \
|xargs -i python -c "print( {} 0)"
统计2
ps axu --sort -rss \
|awk '{print $6}'|tail -n +2 \
|xargs -i echo "{} +"|xargs -r \
|xargs -i python -c "print( {} 0)"
Leave a Reply