首先使用ps aux 检测到耗资源的进程。
4652 mysql 15 0 454m 124m 4752 S 58 3.1 2144:29 mysqld
如mysqld。
之后使用网络命令:netstat -anp 来检测该程序链接的端口:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:52422 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4652/mysqld
tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 5223/mysqld