• netstat


    netstat -help

    usage: netstat [-vWeenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}
           netstat [-vWnNcaeol] [<Socket> ...]
           netstat { [-vWeenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]
    
            -r, --route              display routing table
            -I, --interfaces=<Iface> display interface table for <Iface>
            -i, --interfaces         display interface table
            -g, --groups             display multicast group memberships
            -s, --statistics         display networking statistics (like SNMP)
            -M, --masquerade         display masqueraded connections
    
            -v, --verbose            be verbose
            -W, --wide               don't truncate IP addresses
            -n, --numeric            don't resolve names
            --numeric-hosts          don't resolve host names
            --numeric-ports          don't resolve port names
            --numeric-users          don't resolve user names
            -N, --symbolic           resolve hardware names
            -e, --extend             display other/more information
            -p, --programs           display PID/Program name for sockets
            -o, --timers             display timers
            -c, --continuous         continuous listing
    
            -l, --listening          display listening server sockets
            -a, --all                display all sockets (default: connected)
            -F, --fib                display Forwarding Information Base (default)
            -C, --cache              display routing cache instead of FIB
            -Z, --context            display SELinux security context for sockets
    
      <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw}
               {-x|--unix} --ax25 --ipx --netrom
      <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet
      List of possible address families (which support routing):
        inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
        netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
        x25 (CCITT X.25) 
    


    windows下

    netstat /?

    显示协议统计信息和当前 TCP/IP 网络连接。
    
    NETSTAT [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-x] [-t] [interval]
    
      -a            显示所有连接和侦听端口。
      -b            显示在创建每个连接或侦听端口时涉及的
                    可执行程序。在某些情况下,已知可执行程序承载
                    多个独立的组件,这些情况下,
                    显示创建连接或侦听端口时
                    涉及的组件序列。在此情况下,可执行程序的
                    名称位于底部 [] 中,它调用的组件位于顶部,
                    直至达到 TCP/IP。注意,此选项
                    可能很耗时,并且在你没有足够
                    权限时可能失败。
      -e            显示以太网统计信息。此选项可以与 -s 选项
                    结合使用。
      -f            显示外部地址的完全限定
                    域名(FQDN)。
      -n            以数字形式显示地址和端口号。
      -o            显示拥有的与每个连接关联的进程 ID。
      -p proto      显示 proto 指定的协议的连接;proto
                    可以是下列任何一个: TCP、UDP、TCPv6 或 UDPv6。如果与 -s
                    选项一起用来显示每个协议的统计信息,proto 可以是下列任何一个:
                    IP、IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 或 UDPv6。
      -q            显示所有连接、侦听端口和绑定的
                    非侦听 TCP 端口。绑定的非侦听端口
                     不一定与活动连接相关联。
      -r            显示路由表。
      -s            显示每个协议的统计信息。默认情况下,
                    显示 IP、IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 和 UDPv6 的统计信息;
                    -p 选项可用于指定默认的子网。
      -t            显示当前连接卸载状态。
      -x            显示 NetworkDirect 连接、侦听器和共享
                    终结点。
      -y            显示所有连接的 TCP 连接模板。
                    无法与其他选项结合使用。
      interval      重新显示选定的统计信息,各个显示间暂停的
                    间隔秒数。按 CTRL+C 停止重新显示
                    统计信息。如果省略,则 netstat 将打印当前的
                    配置信息一次。
    

    netstat -nlp|grep pid

    netstat -tunlp |grep pid。。。
    问题是tu是啥参数?

    netstat -ano
    netstat -nlp
    就够了

    剩下的,,没用过。

  • 相关阅读:
    BZOJ 3677 连珠线
    BZOJ 3676 回文串
    BZOJ 3675 序列分割
    BZOJ 4013 实验比较
    BZOJ 4011 落忆枫音
    使用Google BBR加速 VPS
    OSX编译安装Python3及虚拟开发环境Virtualenv
    OSX安装Mysql8.0
    OpenSSL编程之摘要
    OpenCA搭建
  • 原文地址:https://www.cnblogs.com/tekikesyo/p/16652063.html
Copyright © 2020-2023  润新知