查看进程占用内存CPU

!ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%mem|head

PID  PPID %MEM %CPU CMD
3790  3749  6.8  0.3 /usr/bin/gnome-shell
4406  4319  6.1  8.1 /home/xt/anaconda3/bin/python /home/xt/anaconda3/bin/jupyter-notebook
4452  4406  3.0  3.7 /home/xt/anaconda3/bin/python -m ipykernel_launcher -f /home/xt/.local/share/jupyter/runtime/kernel-d4bc11c0-23bb-43fd-a4cb-873543c72c59.json
4436  4406  3.0  2.5 /home/xt/anaconda3/bin/python -m ipykernel_launcher -f /home/xt/.local/share/jupyter/runtime/kernel-06cebbd0-0725-40ae-8f0b-579676e509c3.json
3409  3248  1.2  0.0 /usr/bin/X :0 -background none -noreset -audit 4 -verbose -auth /run/gdm/auth-for-gdm-HWeRGw/database -seat seat0 vt1
4218     1  1.1  0.2 ./web73 -addr 192.168.56.104:33033
3210     1  0.9  0.0 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
3888  3749  0.9  0.0 /usr/libexec/gsd-media-keys
3867  3749  0.8  0.0 /usr/libexec/gsd-xsettings

参考文章