top,ps查看进程使用内存情况

ps -e -o 'pid,comm,args,pcpu,vsz,stime,user,uid' |grep chrome|grep -v grep
watch 'ps -e -o 'pid,comm,args,pcpu,rsz,vsz,stime,user,uid' |grep chrome |grep -v grep'
ps -aux|awk '{print $4"\t"$11}'|grep -v MEM|sort -r
ps -axu|awk '{print $4,$11}'|sort -r



top -b -n 1 |grep chrome|awk '{print "cpu:"$9"%","mem:"$10"%"}'
top -d 1
然后shift + m(Sort by memory usage)
top,按下f后可以选择各个选项:
Fields Management for window 1:Def, whose current sort field is %CPU
Navigate with Up/Dn, Right selects for move then <Enter> or Left commits,
'd' or <Space> toggles display, 's' sets sort. Use 'q' or <Esc> to end!

 

参考资料地址

posted @ 2013-12-02 13:39  陳聽溪  阅读(843)  评论(0编辑  收藏  举报