位置: 编程技术 - 正文

Linux下常用网络命令总结(linux常用网络工具)

编辑:rootadmin

推荐整理分享Linux下常用网络命令总结(linux常用网络工具),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:linux常用网络配置命令有哪些?,linux常用网络探测命令,linux常用网络端口的范围是多少,linux常用网络端口的范围是多少,linux常用网络工具,linux常用网络命令详解,linux常用网络命令,linux常用网络端口的范围是多少,内容如对您有帮助,希望把文章链接给更多的朋友!

你可以使用以下任何一个命令:nstat 命令 : 网络统计工具

键入以下命令:

复制代码代码如下:# nstat

输出样例:

#kernel IpInReceives 0.0 IpInDelivers 0.0 IpOutRequests 0.0 IcmpOutErrors 0.0 IcmpOutTimeExcds 0.0 IcmpMsgOutType3 0.0 TcpActiveOpens 0.0 TcpEstabResets 0.0 TcpInSegs 0.0 TcpOutSegs 0.0 TcpRetransSegs 0.0 TcpOutRsts 0.0 UdpInDatagrams 0.0 UdpNoPorts 0.0 UdpOutDatagrams 0.0 Ip6OutNoRoutes 0.0 TcpExtTW 0.0 TcpExtDelayedACKs 0.0 TcpExtDelayedACKLocked 1 0.0 TcpExtDelayedACKLost 0.0 TcpExtTCPHPHits 0.0 TcpExtTCPPureAcks 0.0 TcpExtTCPHPAcks 0.0 TcpExtTCPSackRecovery 1 0.0 TcpExtTCPLossUndo 0.0 TcpExtTCPSackFailures 4 0.0 TcpExtTCPFastRetrans 1 0.0 TcpExtTCPSlowStartRetrans 3 0.0 TcpExtTCPTimeouts 0.0 TcpExtTCPDSACKOldSent 0.0 TcpExtTCPDSACKRecv 5 0.0 TcpExtTCPAbortOnData 0.0 TcpExtTCPAbortOnClose 0.0 TcpExtTCPSackShiftFallback 9 0.0 IpExtInOctets 0.0 IpExtOutOctets 0.0

ss 命令 : 查询套接字工具

要查看统计汇总, 输入:

复制代码代码如下:# ss -s

输出样例:

Total: (kernel ) TCP: (estab , closed 7, orphaned 0, synrecv 0, timewait 6/0), ports Transport Total IP IPv6 * - - RAW 1 1 0 UDP 9 3 TCP 6 INET 9 FRAG 0 0 0

netstat 命令 : 不错的显示套接字信息的旧工具

查看所有网络端口以及汇总信息表,输入:

复制代码代码如下:# netstat -i

输出样例:

Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 0 0 0 0 0 0 0 BMRU lo 0 0 0 0 0 0 0 LRU ppp0 0 0 0 0 0 0 0 MOPRU

查看每个协议的汇总统计信息,输入:

复制代码代码如下:# netstat -s

输出样例:

Ip: total packets received 0 forwarded 0 incoming packets discarded incoming packets delivered requests sent out dropped because of missing route reassemblies required packets reassembled ok Icmp: ICMP messages received 0 input ICMP message failed. ICMP input histogram: timeout in transit: 8 echo replies: 9 ICMP messages sent 0 ICMP messages failed ICMP output histogram: destination unreachable: echo request: IcmpMsg: InType0: 9 InType: 8 OutType3: OutType8: Tcp: active connections openings passive connection openings failed connection attempts connection resets received 7 connections established segments received segments send out segments retransmited 6 bad segments received. resets sent Udp: packets received packets to unknown port received. 0 packet receive errors packets sent UdpLite: TcpExt: invalid SYN cookies received 8 resets received for embryonic SYN_RECV sockets packets pruned from receive queue because of socket buffer overrun TCP sockets finished time wait in fast timer packets rejects in established connections because of timestamp delayed acks sent 6 delayed acks further delayed because of locked socket Quick ack mode was activated times 1 packets directly queued to recvmsg prequeue. 1 bytes directly received in process context from prequeue packet headers predicted acknowledgments not containing data payload received predicted acknowledgments times recovered from packet loss by selective acknowledgements congestion windows recovered without slow start by DSACK congestion windows recovered without slow start after partial ack TCP data loss events TCPLostRetransmit: 1 timeouts after reno fast retransmit timeouts after SACK recovery timeouts in loss state fast retransmits 5 forward retransmits retransmits in slow start other TCP timeouts SACK retransmits failed packets collapsed in receive queue due to low socket buffer DSACKs sent for old packets DSACKs sent for out of order packets DSACKs received 9 DSACKs for out of order packets received connections reset due to unexpected data connections reset due to early user close connections aborted due to timeout TCPDSACKIgnoredOld: 3 TCPDSACKIgnoredNoUndo: TCPSpuriousRTOs: 4 TCPSackShifted: TCPSackMerged: TCPSackShiftFallback: IpExt: InMcastPkts: OutMcastPkts: InBcastPkts: 1 InOctets: OutOctets: InMcastOctets: OutMcastOctets: InBcastOctets:

Linux下常用网络命令总结(linux常用网络工具)

ip / ifconfig 命令 : 配置或者显示网络端口信息

键入以下命令:

复制代码代码如下:# ifconfig

或者

复制代码代码如下:# /sbin/ifconfig

或者

复制代码代码如下: # ifconfig eth0

eth0 Link encap:Ethernet HWaddr b8:ac:6f:::e5 inet addr:..1.5 Bcast:..1. Mask:...0 inet6 addr: fe::baac:6fff:fe:e5/ Scope:Link UP BROADCAST RUNNING MULTICAST MTU: Metric:1 RX packets: errors:0 dropped:0 overruns:0 frame:0 TX packets: errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen: RX bytes: (1.1 GiB) TX bytes: (.5 MiB) Interrupt: lo Link encap:Local Loopback inet addr:.0.0.1 Mask:.0.0.0 inet6 addr: ::1/ Scope:Host UP LOOPBACK RUNNING MTU: Metric:1 RX packets: errors:0 dropped:0 overruns:0 frame:0 TX packets: errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes: (1.3 MiB) TX bytes: (1.3 MiB) ppp0 Link encap:Point-to-Point Protocol inet addr:.1.. P-t-P:.0.. Mask:... UP POINTOPOINT RUNNING NOARP MULTICAST MTU: Metric:1 RX packets: errors:0 dropped:0 overruns:0 frame:0 TX packets: errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes: (2.2 MiB) TX bytes: (.5 KiB)

显示网络端口统计信息,输入:

复制代码代码如下:# ip -s link

输出样例:

1: lo: mtu qdisc noqueue state UNKNOWN link/loopback ::::: brd ::::: RX: bytes packets errors dropped overrun mcast 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 2: eth0: mtu qdisc mq state UP qlen link/ether b8:ac:6f:::e5 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 3: wlan0: mtu qdisc noop state DOWN qlen link/ether ::6a:ca:9b: brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 4: pan0: mtu qdisc noop state DOWN link/ether 4a:c7:5f:0e:8e:d8 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 8: ppp0: mtu qdisc pfifo_fast state UNKNOWN qlen 3 link/ppp RX: bytes packets errors dropped overrun mcast 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0

sar 命令: 显示网络统计信息

输入以下命令 (你需要 通过sysstat包安装并启用sar):

复制代码代码如下:sar -n DEV

Linux 2.6.-.2.1.el6.x_ (www.cyberciti.biz) Tuesday March _x__ (2 CPU) :: CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. .... .. .... .. . :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s Average: lo 0. 0. 0. 0. 0. 0. 0. Average: eth0 . . . . 0. 0. 0. Average: eth1 . . . . 0. 0. 0.

或者输入以下命令:

复制代码代码如下: # sar -n DEV 1 3

输出样例:

Linux 2.6.-.2.1.el6.x_ (www.cyberciti.biz) Tuesday March _x__ (2 CPU) :: CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. :: CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s :: CDT lo 0. 0. 0. 0. 0. 0. 0. :: CDT eth0 . . . . 0. 0. 0. :: CDT eth1 . . . . 0. 0. 0. Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s Average: lo 0. 0. 0. 0. 0. 0. 0. Average: eth0 . . . . 0. 0. 0. Average: eth1 . . . . 0. 0. 0.

在Linux系统中使用iptraf进行网络监控 iptraf是一个基于ncurses开发的IP局域网监控工具,它可以生成各种网络统计数据,包括TCP信息、UDP统计、ICMP和OSPF信息、以太网负载信息、节点统计、IP校

Linux中复制目录报错cp:omitting directory的解决办法 Linux系统中复制目录到另一个目录下面,用cp命令时会出现报错1、在/home/目录下,创建一个新目录,例如:、拷贝目录到/tmp/目录中,使用cp命令3、

在Linux系统中使用Gitblit工具创建Git仓库的方法 嗨!朋友,今天我们将学习如何在你的Linux服务器或者PC上安装Gitblit工具。首先,我们看看什么是Git,它的功能以及安装Gitblit的步骤。Git是分布式版本

标签: linux常用网络工具

本文链接地址:https://www.jiuchutong.com/biancheng/364054.html 转载请保留说明!

上一篇:在Linux系统上实现IP转发的方法(在linux系统中)

下一篇:在Linux系统中使用iptraf进行网络监控(在linux操作系统中,/etc/rc.d/init.d)

  • 房地产企业增值税计算
  • 个人所得税退还是不退好
  • 用友u8固定资产折旧怎么生成凭证
  • 为什么应交增值税记在借方
  • 企业的培训费会计分录
  • 新成立的公司要去税务局办理什么
  • 金税盘地区编号怎么查
  • 民非企业附加税入什么科目
  • 增值税销项税额影响入账金额吗
  • 向董事赠送礼品怎么写
  • 采购设备包含安装费用吗
  • 滞留票的处理
  • 小规模出口企业增值税申报
  • 开发间接费用是指
  • 企业购买小轿车进项税额可以抵扣吗
  • 企业所得税税收优惠方式有哪些
  • 快递费税率是6还是9
  • 美国边境管理体制
  • 注册资本越大越有实力
  • 临时工怎样做账
  • 三免三减半税收优惠政策文件
  • 核定征收取消了
  • 个税申报状态失败
  • 承兑贴息的会计分录
  • 公司买的油烟机可以抵扣进项税吗
  • 月销售不超过10万免征哪些税
  • 进项退回怎么做账
  • win101703怎么看
  • win10运行红色警戒2卡顿
  • windows10如何更换桌面壁纸
  • 广告法 保险公司承保
  • 年底会计人员要做什么
  • php经典教程
  • php yii框架
  • 公司承担的社保公积金怎么做账
  • 应收票据包括哪些支票
  • 高新企业政府补贴政策
  • thinkphp 数据库查询
  • php有很多流行的mvc框架,这些框架可以
  • 转回已核销的坏账
  • 运输企业成本核算内容有哪些?
  • 金税盘锁死状态
  • es6 promise finally
  • php图像识别技术是什么
  • php如何上传文件
  • 专利年费缴纳详细流程
  • 保障金计入什么科目
  • 纳税调增调减通俗易懂
  • phpcms使用教程
  • mongodb win7
  • 哪些情况不能开专用发票
  • 可供出售金融资产名词解释
  • 员工福利开的专票怎么做分录
  • 固定成本和变动成本包括哪些
  • 评估增值净利润调减
  • 其他综合收益什么情况下转入留存收益
  • 银行的存单丢失了可以补办吗
  • 化妆品的成本利润率
  • 工资每月变动社保怎么变
  • 未开票收入怎么做账
  • 职工福利费和工会经费
  • 汽车价外费用
  • 向非关联企业捐赠现金能不能抵扣
  • macbook如何使用word
  • cgi linux
  • Windows8怎么打开任务管理器
  • Android的AsyncTask官方API谷歌翻译版
  • 检测输入条件的各种组合
  • js四舍五入两位小数
  • unity怎么把文件导入项目
  • python t()
  • Unity3D游戏开发(第2版)
  • html css js 实战案例
  • 初步了解的英文
  • 湖北农信换手机登录不了
  • 自贡市税务局稽查局领导
  • 松原江北小吃一条街
  • 武汉税务电话号码
  • 天津地税自助办税终端
  • 准生证网上查询码是个什么
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设