linux netstat

/ # netstat -h
netstat: invalid option – ‘h’
BusyBox v1.27.1 (2019-07-03 15:05:44 CST) multi-call binary.

Usage: netstat [-ral] [-tuwx] [-enWp]

Display networking information

    -r      Routing table
    -a      All sockets
    -l      Listening sockets
            Else: connected sockets
    -t      TCP sockets
    -u      UDP sockets
    -w      Raw sockets
    -x      Unix sockets
            Else: all socket types
    -e      Other/more information
    -n      Don't resolve names
    -W      Wide display
    -p      Show PID/program name for sockets

/ #
/ # netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 (null):1700 (null)? LISTEN
tcp 0 0 (null):9000 (null)? LISTEN
tcp 0 0 (null):2601 (null)? LISTEN
tcp 0 0 (null):2604 (null)? LISTEN
tcp 0 0 (null):2607 (null)? LISTEN
tcp 0 0 (null):22 (null)? LISTEN
tcp 0 0 (null):8000 (null)? LISTEN
tcp 0 0 :::2601 ::? LISTEN
tcp 0 0 :::2604 ::? LISTEN
tcp 0 0 :::22 ::? LISTEN
udp 0 0 (null):1700 (null)?
raw 25344 0 (null):1 (null)? 1
raw 0 0 (null):47 (null)? 47
raw 0 0 (null):89 (null)? 89
raw 0 0 :::58 ::? 58
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 695 @osi_ll_mgmt_if_0
unix 2 [ ACC ] STREAM LISTENING 647 /var/run/zebra/zserv.api
unix 2 [ ACC ] STREAM LISTENING 658 /var/run/zebra/zebra.vty
unix 2 [ ACC ] STREAM LISTENING 674 /var/run/zebra/ospfd.vty
unix 2 [ ACC ] STREAM LISTENING 709 @osi_ll_notify_if_0
/ #
/ # netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:1700 0.0.0.0:* LISTEN 958/osi_ll
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 969/aptn_app.exe
tcp 0 0 0.0.0.0:2601 0.0.0.0:* LISTEN 953/zebra
tcp 0 0 0.0.0.0:2604 0.0.0.0:* LISTEN 955/ospfd
tcp 0 0 0.0.0.0:2607 0.0.0.0:* LISTEN 955/ospfd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 806/sshd
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 969/aptn_app.exe
tcp 0 0 :::2601 ::? LISTEN 953/zebra
tcp 0 0 :::2604 ::? LISTEN 955/ospfd
tcp 0 0 :::22 ::? LISTEN 806/sshd
/ #

/ # netstat -n
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:47411 127.0.0.1:1700 ESTABLISHED
tcp 0 0 127.0.0.1:2607 127.0.0.1:4000 ESTABLISHED
tcp 0 0 127.0.0.1:58891 127.0.0.1:4001 ESTABLISHED
tcp 0 0 127.0.0.1:1700 127.0.0.1:47412 ESTABLISHED
tcp 0 0 127.0.0.1:1700 127.0.0.1:47413 ESTABLISHED
tcp 0 0 127.0.0.1:47413 127.0.0.1:1700 ESTABLISHED
tcp 0 0 127.0.0.1:4000 127.0.0.1:2607 ESTABLISHED
tcp 0 0 127.0.0.1:47412 127.0.0.1:1700 ESTABLISHED
tcp 0 0 127.0.0.1:4001 127.0.0.1:58891 ESTABLISHED
tcp 0 0 127.0.0.1:1700 127.0.0.1:47411 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ] DGRAM 687 @s.mgnt_srv0
unix 2 [ ] DGRAM 680 @s.pppdm
unix 2 [ ] DGRAM 739 @00001
unix 2 [ ] DGRAM 688 @s.mgnt_sig
unix 3 [ ] STREAM CONNECTED 702
unix 2 [ ] DGRAM 769
unix 2 [ ] DGRAM 913
unix 3 [ ] STREAM CONNECTED 693
unix 2 [ ] DGRAM 770
unix 3 [ ] STREAM CONNECTED 676
unix 2 [ ] DGRAM 914
unix 3 [ ] STREAM CONNECTED 677 /var/run/zebra/zserv.api
unix 3 [ ] STREAM CONNECTED 694
unix 3 [ ] STREAM CONNECTED 697
unix 2 [ ] DGRAM 840
unix 2 [ ] DGRAM 715
unix 3 [ ] STREAM CONNECTED 701
unix 3 [ ] STREAM CONNECTED 696
/ #

/ # netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 (null):47411 (null):1700 ESTABLISHED
tcp 0 0 (null):2607 (null):4000 ESTABLISHED
tcp 0 0 (null):58891 (null):4001 ESTABLISHED
tcp 0 0 (null):1700 (null):47412 ESTABLISHED
tcp 0 0 (null):1700 (null):47413 ESTABLISHED
tcp 0 0 (null):47413 (null):1700 ESTABLISHED
tcp 0 0 (null):4000 (null):2607 ESTABLISHED
tcp 0 0 (null):47412 (null):1700 ESTABLISHED
tcp 0 0 (null):4001 (null):58891 ESTABLISHED
tcp 0 0 (null):1700 (null):47411 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ] DGRAM 687 @s.mgnt_srv0
unix 2 [ ] DGRAM 680 @s.pppdm
unix 2 [ ] DGRAM 739 @00001
unix 2 [ ] DGRAM 688 @s.mgnt_sig
unix 3 [ ] STREAM CONNECTED 702
unix 2 [ ] DGRAM 769
unix 2 [ ] DGRAM 913
unix 3 [ ] STREAM CONNECTED 693
unix 2 [ ] DGRAM 770
unix 3 [ ] STREAM CONNECTED 676
unix 2 [ ] DGRAM 914
unix 3 [ ] STREAM CONNECTED 677 /var/run/zebra/zserv.api
unix 3 [ ] STREAM CONNECTED 694
unix 3 [ ] STREAM CONNECTED 697
unix 2 [ ] DGRAM 840
unix 2 [ ] DGRAM 715
unix 3 [ ] STREAM CONNECTED 701
unix 3 [ ] STREAM CONNECTED 696
/ #

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值