range

If there were you, the world would be just right

Htop查看内存占用大小:

执行大M,按占用内存排序

ps命令查看占用内存大小:

ps -aux | grep qx_report

通过进程的status文件查看进程占用内存大小:

cat /proc/26641/status  # VmRSS对应的值就是物理内存占用

查看内存占用前10名进程:

ps aux | sort -k4,4nr | head -n 10

批量杀死进程

ps -aux | grep qx_report | grep -v grep | cut -c 9-15 | xargs kill -15
grep -v grep 是在列出的进程中去除含有关键字"grep"的进程
"kill -15"会正常退出指定进程,-9强行杀掉
cut -c 9-15 获取进程ID部分