首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >netstat输出意义

netstat输出意义
EN

Ask Ubuntu用户
提问于 2014-05-31 11:52:02
回答 1查看 7.9K关注 0票数 2

我运行netstat -a | grep ftp,结果是

代码语言:javascript
复制
tcp        0      0 *:ftp                   *:*                     LISTEN

这些零和星星的含义是什么?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2014-05-31 12:05:35

netstat命令的输出如下,

代码语言:javascript
复制
Proto Recv-Q Send-Q Local Address           Foreign Address         State

对上述格式的解释如下。

来自man netstat

代码语言:javascript
复制
   Proto
       The protocol (tcp, udp, raw) 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 acknowledged by the remote host.

   Local Address
       Address and port number of the local end of  the  socket.   Unless  the
       --numeric  (-n)  option is specified, the socket address is resolved to
       its canonical host name (FQDN), and the port number is translated  into
       the corresponding service name.

   Foreign Address
       Address  and port number of the remote end of the socket.  Analogous to
       "Local Address."

   State
       The state of the socket. Since there are no states in raw mode and usu‐
       ally  no  states  used  in UDP, this column may be left blank.Normally
   this can be one of several values:

   ESTABLISHED
          The socket has an established connection.

   SYN_SENT
          The socket is actively attempting to establish a connection.

   SYN_RECV
          A connection request has been received from the network.

   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 to handle packets still in the
          network.

   CLOSE  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 has shut down, and the socket is closed.  Waiting
          for acknowledgement.

   LISTEN The  socket is listening for incoming connections.  Such sockets
          are not included in the output unless you specify the  --listen‐
          ing (-l) or --all (-a) option.

你的例子:

代码语言:javascript
复制
tcp        0      0 *:ftp                   *:*                     LISTEN
  • 0 -零字节计数
  • *:* -外国地址将是任何形式的:(任何事物:任何)。没有提到任何特定的地址。
票数 6
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/474857

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档