zoukankan      html  css  js  c++  java
  • 网络相关命令-netstat

    网络相关命令

    1. netstat显示网络状态

    usage: netstat [-vWeenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vWnNcaeol] [ ...] netstat { [-vWeenNac] -i | [-cWnNe] -M | -s }

        -r, --route              display routing table
        -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
        -c, --continuous         continuous listing
    
    
        -l, --listening          display listening server sockets
        -a, --all, --listening   display all sockets (default: connected)
        -o, --timers             display timers
        -F, --fib                display Forwarding Information Base (default)
        -C, --cache              display routing cache instead of FIB
    
    

    常用选项: netstat -apn | grep 8000 监听占用8000端口的程序状态。

    示例

    ~$netstat -apn |grep 2000

    tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 3311/ser
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44100 TIME_WAIT -
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44102 TIME_WAIT -
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44099 TIME_WAIT -
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44103 TIME_WAIT -
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44098 TIME_WAIT -
    tcp 0 0 192.168.1.103:2000 192.168.1.103:44101 TIME_WAIT -

     

    参考应用:解决TIME_WAIT过多造成的问题_转

  • 相关阅读:
    HDU 1124 Factorial
    hdu 1690 Bus System
    hdu 1113 Word Amalgamation
    POJ 2482 Stars in Your Window
    hdu 1385 ZOJ 1456 Minimum Transport Cost(经典floyd)
    hdu 1907 John
    VMware 虚拟机 安装 UBuntu 9.10 命令模式转换成窗口模试
    #pragma CODE_SEG __NEAR_SEG NON_BANKED详解
    Ubuntu 下Hadoop 伪分布式 hadoop0.20.2.tar.gz 的安装
    文件拷贝代码以及疑问
  • 原文地址:https://www.cnblogs.com/embedded-linux/p/4999000.html
Copyright © 2011-2022 走看看