位置: 编程技术 - 正文

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)

  • 商贸企业辅导期是什么
  • 工资绩效被扣除怎么办
  • 完税证明可以代替契税发票吗
  • 房地产开发企业会计科目
  • 增值税专用发票和普通发票的区别
  • 最新的税收政策
  • 打折销售商品会计分录
  • 将自产的产品用于对外投资
  • 提前给货款计入什么科目
  • 发行债券到期一次还本付息和按月付息哪个发行价格低
  • 哪些是非累计带薪缺勤?
  • 金融企业贷款损失税前扣除
  • 进项税抵扣需要做分录吗
  • 票据质押放流贷的风险归谁
  • 还有主营业务收入这个科目
  • 工程税金计入哪个账户
  • 自然人股权转让要交什么税
  • 会计核算的主要依据是什么
  • 房地产销售广告是要约还是要约邀请?原因是什么?
  • 劳务报酬的个税计算方法
  • linux使用cp
  • php验证码代码怎么写
  • 什么是应交税费科目
  • Linux下which、whereis、locate、find 区别
  • 待摊费用计入哪里
  • 出差海外
  • 变动成本法计算营业利润
  • php_imagick
  • 一点分享案例
  • ajax调用php接口
  • php链式操作
  • 机器学习报错解决2——ValueError: too many values to unpack (expected 3)
  • 定额发票累计领取怎么算
  • 用支付宝支付的游戏
  • yii2框架和fastadmin建商城网站哪个好用
  • php initialize
  • 适用于windows7的更新程序会更新到windows10吗
  • vue虚拟domdiff算法
  • linux清理文件内容
  • 招待费的进项税必须认证后转出吗
  • 企业所得税不得核定征收行业
  • 赔偿款收据样本
  • 应付未付货款会计分录
  • 如何升级智慧中小学app
  • 全国通用机打销售票真伪
  • 数据库生成随机数函数
  • 实际利率法如何理解
  • 应付股利科目怎么结转
  • 滞纳金冲留底税额怎么算
  • 利息收入的正确分录凭证怎么写
  • 标准成本法计算公式图
  • casewhen嵌套查询
  • Mysql使用or如何优化
  • sql中将数据放到另一个表中
  • centos的优缺点
  • 安装硬盘视频教程
  • 如何利用批处理实现更改ip修改
  • win7无法安装谷歌
  • ubuntu20.4 ssh
  • linux ioctrl
  • windows临时文件在哪里
  • linux vim 查找替换
  • Win10 Mobile build 10586.338安装/上手体验视频
  • jquery操作表格
  • 在布局中使用选定的比例
  • cocos2d怎么用
  • jquery弹出div窗口
  • 学node.js需要什么基础
  • cacls命令怎么运用
  • python第三方库文档怎么看
  • jquery简单例子
  • jQuery使用zTree插件实现树形菜单和异步加载
  • python如何编写
  • unity3d效果图
  • python怎么读取中文txt文本
  • js如何定义类
  • 西安房屋契税退税政策2020年
  • 全国税务查询
  • 更改税务购票员
  • 电子税务局房产税原值怎么改
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设