Linux netstat 命令常用選項詳解

來源:互聯網
上載者:User
netstat命令的功能是顯示網路連接、路由表和網路介面資訊,可以讓使用者得知目前都有哪些網路連接正在運作。

該命令的一般格式為:

netstat [選項]

命令中各選項的含義如下:

-a 顯示所有socket,包括正在監聽的。

-c 每隔1秒就重新顯示一遍,直到使用者中斷它。

-i 顯示所有網路介面的資訊,格式同“ifconfig -e”。

-n 以網路IP地址代替名稱,顯示出網路連接情形。

-r 顯示核心路由表,格式同“route -e”。

-t 顯示TCP協議的串連情況。

-u 顯示UDP協議的串連情況。

-v 顯示進行中的工作。

[例]在本地機上使用netstat命令。

$ netstat

Active Internet connections (w/o servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

Active UNIX domain sockets (w/o servers)

Proto RefCnt Flags Type State I-Node Path

unix 1 [ ] STREAM CONNECTED 270 @00000008

unix 1 [ ] STREAM CONNECTED 150 @00000002

unix 1 [ ] STREAM CONNECTED 104 @00000001

unix 1 [ ] STREAM CONNECTED 222 @00000004

unix 1 [ ] STREAM CONNECTED 171 @00000003

unix 1 [ ] STREAM CONNECTED 271 /dev/log

unix 1 [ ] STREAM CONNECTED 225 /dev/log

unix 1 [ ] STREAM CONNECTED 223 /dev/log

unix 1 [ ] STREAM CONNECTED 203 /dev/log

unix 1 [ ] STREAM CONNECTED 105 /dev/log

……

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.