系统版本:Centos7
问题:处理异常端口进程服务文件
解决方案:查看异常端口:
netstat -atnlp
cat /proc/PID/exe | more
ls -l /proc/PID/exe
netstat -antlp | grep 异常IP |awk '{print $7}' | cut -f1 -d"/"
查看进程:
ps aux | grep PIDnet file /proc/PID/exe ps aux --sort=pcpu | head -10 #查看CPU占用率前十的进程 ps -ef --sort -pcpu #按CPU使用率从高到底排序 ps -ef --sort -pmem #按内存从高到低
分析进程:
lsof -p PID
查看服务启动时间以及杀掉进程:
ps -p PID -o lstart kill -9 PID
查看服务:
chkconfig chkconfig --list systemctl list-unit-files |grep enabled



