码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 16.04 LTS中检测特定端口号

时间:2018-02-13 23:35:05      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:send   rom   name   nec   mysqld   address   tcp   dnsmasq   stat   

实例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中检测特定端口号

标签:send   rom   name   nec   mysqld   address   tcp   dnsmasq   stat   

原文地址:http://blog.51cto.com/qwfys200/2071595

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!