1. 程式人生 > >Ubuntu 16.04 LTS中檢測特定端口號

Ubuntu 16.04 LTS中檢測特定端口號

mysqld lis net grafana netstat for 127.0.0.1 當前 proto

實例1

  檢測與influxd程序相關的幾個端口號。

lwk@qwfys ~ $ sudo netstat -naptu | grep LISTEN | grep influxd
tcp6       0      0 :::8083                 :::*                    LISTEN      15668/influxd   
tcp6       0      0 :::8086                 :::*                    LISTEN      15668/influxd   
tcp6       0      0 :::8088                 :::*                    LISTEN      15668/influxd  

  檢測當前哪些端號號打開著
#實例2

lwk@qwfys ~ $ sudo netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1617/dnsmasq    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1477/mysqld     
tcp6       0      0 :::3000                 :::*                    LISTEN      13576/grafana-serve
udp        0      0 0.0.0.0:631             0.0.0.0:*                           1050/cups-browsed
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           2908/chrome     
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           852/avahi-daemon: r
udp        0      0 0.0.0.0:46618           0.0.0.0:*                           852/avahi-daemon: r
udp        0      0 0.0.0.0:40932           0.0.0.0:*                           1617/dnsmasq    
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1617/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1597/dhclient   
udp        0      0 192.168.1.71:123        0.0.0.0:*                           2539/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           2539/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           2539/ntpd       
udp6       0      0 :::42801                :::*                                852/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                2908/chrome     
udp6       0      0 :::5353                 :::*                                852/avahi-daemon: r
udp6       0      0 fe80::1450:2330:2f6:123 :::*                                2539/ntpd       
udp6       0      0 ::1:123                 :::*                                2539/ntpd       
udp6       0      0 :::123                  :::*                                2539/ntpd  

Ubuntu 16.04 LTS中檢測特定端口號