码迷,mamicode.com
首页 > Web开发 > 详细

netstat命令

时间:2016-11-21 11:15:34      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:text   stat   let   bsp   name   连接   ships   timer   rbo   

虽然经常用这个命令,但总是对其中的参数作用不太清楚,记录下

what are functions of netstat?

netstat - Print network connections, routing tables, interface statistics, masquerade
connections, and multicast memberships(大意就是打印网络连接。路由表。接口数据,伪装的连接和多播的成员关系)

netstat的参数很多,记录下常用的

-t #代表tcp

-u #代表udp

-l #show only listening sockets

-a #show both listening and non-listening(for TCP this means established connections)

-n #show numerical addressed instead of trying to determine symbolic host,port or user names

-v #代表verbose

-p #show the PID and name of the program to which each socket belongs

-o #Include information related to networking timers

-C #print routing information from the route cache

-Z #If selinux enabled print selinx context

-g #display multicast group membership information for IPV4 and IPV6

-r #display the kernel routing tables

-e #display other/more information

 

咱们经常用的几个

netstat -lntup |grep "mysqld"

netstat -an|grep 22

------------------------------------------------------

NOTE(可替代的其他命令展示)

This program is obsolete. Replacement for netstat is ss. Replacement for netstat -r
is ip route. Replacement for netstat -i is ip -s link. Replacement for netstat -g
is ip maddr.

 

netstat命令

标签:text   stat   let   bsp   name   连接   ships   timer   rbo   

原文地址:http://www.cnblogs.com/uglyliu/p/6084708.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!