`

netstat 用法详细资料--英文版本

阅读更多
    google到的一份详细的netstat资料,可惜是英文版本,先保存下来慢慢细看,有时间再翻译出一个中文版本来.
原文地址: http://ibgwww.colorado.edu/~lessem/psyc5112/usail/man/linux/netstat.8.html
netstat - Display active network connections
SYNOPSIS netstat [[-a | [-t | -u | -w]] [-n | -o] | -x] [-c]
netstat -i [-a] [-c]
netstat -r [-c] [-n]
netstat -v
DESCRIPTION
Netstat displays the status of network connections on either TCP, UDP, RAW
or UNIX sockets to the system. By default, netstat only displays status
on active socketswhich are not in the LISTEN state (i.e. connections to active processes). To obtain information about the kernel routing table,
netstat may be invoked with the option -r
Netstat's display includes the following information for each socket:
Proto The protocol (either TCP or UDP) used by the socket.
Recv-Q The count of bytes not copied by the user program connected to this socket.
Send-Q The count of bytes not acknoledged by the remote host.
Local Address The local address (local hostname) and port number of the
socket. Unless the -n switch is given, the socket address
is resolved to its canonical hostname, and the port number is translated into the corresponding service name.
Foreign Address The remote address (remote hostname) and port number of he socket. As with the local address:port, the -n switch turns off hostname and service name resolution.
(State)
The state of the socket. Since there are no states in RAW and usually no states used in UDP, this row may be left

ESTABLISHED The socket has an established connection.
SYN_SENT The socket is actively attempting to establish a connection.
SYN_RECV The connection is being initialized.
FIN_WAIT1 The socket is closed, and the connection is shutting down.
FIN_WAIT2 Connection is closed, and the socket is waiting for a shutdown from the remote end.
TIME_WAIT The socket is waiting after close for remote shutdown retransmission.
CLOSED
The socket is not being used.
CLOSE_WAIT The remote end has shut down, waiting for the socket to close.
LAST_ACK The remote end shut down, and the socket is closed. Waiting for acknowledgement.
LISTEN
The socket is listening for incoming connections.
CLOSING Both sockets are shut down but we still don't have
all our data sent.
UNKNOWN The state of the socket is unknown.
If netstat is invoked with the option -o , additional information will be displayed behind the state info. These informations are shown like this: "rx-retransmission byte count" "tx-retransmission byte count" "timer state" "(time/backoff)". Timer state may now be either on or off. The time (in seconds) being displayed is how long it will take the timer to expire. All these options are subject to be removed in later releases of the NET software.
Being invoked with the option -x , netstat displys a list Netstat's display includes the following information for each socket:
Proto The protocol (usually unix) used by the socket.
RefCnt The reference count (i.e. attached processes via this socket).
Flags The only displayed flag is SO_ACCEPTON (displayed as ACC) otherwise left blank. SO_ACCECPTON is used on unconnected sockets if their corresponding processes are waiting for a connect request. The other flags are not of normal inter- est and not displayed.
Type There are several types of socket access:
SOCK_DGRAM The socket is used in Datagram (connectionless) mode.
SOCK_STREAM This is a stream (connection) socket.
SOCK_RAW The socket is used as a raw socket.
SOCK_RDM This one serves reliably-delivered messages.
SOCK_SEQPACKET This is a sequential packet socket.
SOCK_PACKET RAW interface access socket.
UNKNOWN Who ever knows, what the future will bring us just fill in here :-)
State This field will contain one of the following Keywords:
LISTENING The socket is listening for a connection request.
UNCONNECTED The socket is not connected to another one.
CONNECTING The socket is about to establish a connection.
CONNECTED The socket is connected.
DISCONNECTING The socket is disconnecting.
UNKNOWN This state should never happen.
Path This displays the path name as which the corresponding processes attached to the socket.
The network routing table (invoked with netstat -r ) shows up the following information:
Destination net/address The destination adress of a resolved host or hand-entered network is displayed. Unless the option -n is given, the hosts or nets are resolved. An entry named "default" shows up the default route for the kernel.
Gateway address
If there is no Asterisk ('*') displayed - any data will be routed to the dedicated gateway.
Flags
Possible routeing flags are: U This route is useable G Destination is a gateway H Destination is a Host entry R Route will be reinstated after time-out D This one is created dynamically (by redirection) M This one is modified dynamically (by redirection)
RefCnt
Use How many times this route was used yet
Iface This is the name of the Interface, where this route belongs to The device statistics table (invoked with netstat -i ) displays information about the interfaces:
Iface The name this interface.
MTU Maximum size for transmission on this interface. This should be the size of data transferred on this interface without interface specific headers.
RX-OK error free received packets for this interface.
RX-ERR buggy received packets.
RX-DRP dropped received packets (due to memory lack ?).
RX-OVR packets that we were unable to receive that fast way.
TX-OK error free transmitted packets for this interface.
TX-ERR buggy transmitted packets.
TX-DRP dropped transmitteded packets.
TX-OVR packets that we were unable to transmit.
Flags
The following flags may occur on the given interfaces: A This interface will receive all Multicast adresses. B Broadcasts are ok here. D Debugging is turned on.. M all packets are received (Promisc-Mode). N Trailers are avoided. O No Addres Resolution Protocol on this Interface. P Interface is a Point-to-Point connection. R Interface is running. U Interface is up. Options
-a Display information about all internet sockets, i.e. TCP, UDP, RAW and UNIX including those sockets that are listening only.
-i Show network devices statistics. -c Generate a continuous listing of network status: network status is displayed every second until the program is interrupted.
-n Causes netstat not to resolve hostnames and service names when displaying remote and local address and port information.
-o Display timer states, expiration times and backoff state. -r Display kernel routing table. -t Display information about TCP sockets only, including those that are listening. -u Display information about UDP sockets only. -v Print version information. -w Display information about raw sockets. -x Display information about UNIX domain sockets.
FILES
/etc/services -- The services translation file /proc/net/socket -- devices information /proc/net/raw -- RAW socket information /proc/net/tcp -- TCP socket information /proc/net/udp -- UDP socket information /proc/net/unix -- Unix domain socket information
BUGS
Occasionally strange information may appear if a socket changes as it is viewed. This is unlikely to occur.
AUTHORS
The netstat user interface was written by Fred Baumgarten <dc6iq@insu1.etec.uni-karlsruhe.de> the man page basically by Matt Welsh <mdw@tc.cornell.edu>. It was updated by Alan Cox <Alan.Cox@linux.org> but could do with a bit more work.
分享到:
评论

相关推荐

    计算机命令全集(中英文对照)

    ### 计算机命令全集(中英文...以上介绍了一些常用的Windows命令及其使用方法。熟练掌握这些命令可以帮助我们更加高效地进行计算机管理和维护工作。在实际操作中,可以根据具体需求灵活运用这些命令来解决实际问题。

    网络端口查询

    查看端口 在Windows 2000/XP/Server 2003中要查看端口,可以使用Netstat命令: 依次点击“开始→运行”,键入“cmd”并回车,打开命令提示符窗口。在命令提示符状态下键入“netstat -a -n”,按下回车键后就可以看到...

    TCP-IP 详解卷1 英文版

    - **7.2 Ping程序**:详细解析Ping程序的工作原理和使用方法。 - **7.3 IP记录路由选项**:讨论IP记录路由选项的设置方法及其在网络测试中的作用。 - **7.4 IP时间戳选项**:介绍IP时间戳选项的使用方法及其在网络...

    常用网络测试命令详解

    ### 常用网络测试命令详解 #### 一、Ping ...通过以上命令的详细介绍和举例说明,可以更深入地理解这些网络测试命令的功能及其使用方法。这些命令对于网络故障排查、性能优化和日常维护都是非常有用的工具。

    IIS 5.1 完整安装包 (WinXP下安装IIS)

    注意:对于Windows xp英文版操作系统 经测试能进行全部组件的安装,也能正常使用,但IIS信息服务是中文版的。 ================ 安装iis5.1时找不到zClientm.exe的解决方法! 把这[Internet游戏]前的选择框里的那个...

    linux系统命令及VI用法

    #### VI编辑器使用方法 VI编辑器是Linux系统中最常用的文本编辑器之一,具有强大的文本编辑功能。以下是使用VI编辑器的一些基本方法: 1. **进入编辑模式** - `vi filename`: 打开一个文件进行编辑。 - `vim ...

    linux完全命令手册PDF(英文版)

    这本书对于那些希望提升Linux技能、熟悉命令行操作的用户,尤其是对英文有一定掌握的读者来说,是一份非常宝贵的学习资源。下面,我们将详细阐述其中涵盖的一些关键知识点。 首先,Linux命令是操作系统与用户交互的...

    wampserver配置详细图解

    本文以WampServer 2.0f为例进行详细介绍,该版本包含了Apache 2.2.11、PHP 5.2.8和MySQL 5.1.30。 #### 二、安装步骤 ##### 1. 安装前准备 在安装WampServer之前,确保计算机上未安装其他Apache、PHP或MySQL组件...

    计算机cmd运行命令大全

    本文将详细介绍一系列常用的CMD命令及其用法,帮助用户更高效地管理及操作自己的计算机。 #### 一、时间调度命令 (at) `at` 命令用于安排命令或脚本在特定时间运行。例如,以下命令将在每天星期六的凌晨1点执行 `...

    Windows Internal Part1 第六版 英文

    - **命令行工具**:列举了多种常用的命令行工具,如`dir`、`netstat`等,并讲解了它们的使用方法。 2. **系统架构(System Architecture)**: - **体系结构概述**:详细阐述了Windows操作系统的整体架构。 - **...

    计算机端口及计算机常用英语.pdf

    本文将详细介绍计算机端口的概念、分类、查看方法、关闭/开启方法,以及常见网络端口的介绍。 一、端口概念 在网络技术中,端口(Port)有两种意思:物理意义上的端口和逻辑意义上的端口。物理意义上的端口是指...

    Apache+php的常见问题.pdf

    以上内容详细介绍了在使用 Apache+PHP 架构时常见的问题及其解决方案,包括但不限于避免安装在中文目录下的注意事项、修改访问路径的方法、修改默认端口的步骤、如何查看和停止不需要的服务、如何查看端口被哪个程序...

    鸟哥Linux私房菜-基础篇-笔记

    例如,可以设置`LANG=en_US.utf8`和`LC_ALL=en_US.utf8`来使用英文UTF-8编码。 - **功能键的使用**:在Linux中,TAB键可以用于命令补全或列出可能的选项;Ctrl+C可以用于终止正在执行的命令。 - **基础指令操作**:...

    Dos命令完整版

    本文将详细介绍一些最常用且重要的DOS命令及其使用方法。 #### 二、DOS命令的基本特点 - **大小写不敏感**:DOS命令不区分大小写,例如`CD`和`cd`是等价的。 - **特殊字符替代**:对于较长的文件名,可以通过使用...

    AIX命令索引(PDF英文)_2

    "AIX命令索引(PDF英文)_2" 提供了全面的AIX命令参考,帮助用户快速查询和了解各种命令的用法。这个索引分为两部分,本篇主要聚焦于"aixcmds3.pdf"和"aixcmds4.pdf"这两个文件中的命令。 **AIX命令的分类与功能** ...

Global site tag (gtag.js) - Google Analytics