centos7 netstat查看端口占用状况

netstat -tlunp
[root@7tpZ ~]# netstat -tlunpActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program nametcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN      792/jsvc.exectcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      8634/nginx: mastertcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      755/sshdtcp        0      0 172.31.227.168:22391    0.0.0.0:*               LISTEN      835/pythontcp        0      0 0.0.0.0:9081            0.0.0.0:*               LISTEN      792/jsvc.exectcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      11101/trojantcp6       0      0 :::3306                 :::*                    LISTEN      834/mysqldtcp6       0      0 :::21                   :::*                    LISTEN      799/vsftpdudp        0      0 0.0.0.0:44886           0.0.0.0:*                           835/pythonudp        0      0 172.31.227.168:22391    0.0.0.0:*                           835/pythonudp        0      0 172.31.227.168:123      0.0.0.0:*                           564/ntpdudp        0      0 127.0.0.1:123           0.0.0.0:*                           564/ntpdudp        0      0 0.0.0.0:123             0.0.0.0:*                           564/ntpdudp6       0      0 :::123                  :::*                                564/ntpd