今天使用服务器很慢,看下cpu使用情况:
用top查看占用最高的:
ps -aux --sort=pcpu|head -10
切换到test用户,查看定时任务:
果然在这里!!!
- 删除定时任务
crontab -r
- 查看test用户占用的进程
ps -u test
- 删除test用户产生的进程删除test用户产生的进程
[root@localhost nginx]# ps -u test |awk '{ print $1 }' |xargs kill -9
kill: 找不到进程“PID”