位置: 编程技术 - 正文

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)

  • 可抵扣暂时性差异是指在确定未来收回资产
  • 企业所得税相关分录
  • 退回代征手续费怎么做会计分录
  • 以前年度损益调整科目怎么用
  • 本年利润借方余额意味什么
  • 股东是否实缴出资款
  • 航天信息服务费不交可以吗
  • 附加税减半征收会计分录
  • 事业单位财政拨款取得方式
  • 小微企业附加税税收优惠政策
  • 自建模具怎么做账
  • 资本回收系数怎么求
  • 将产品转为本企业使用
  • 费用报销凭证是出纳的吗
  • 审计调整坏账后什么时候回冲分录?
  • 企业用于在建工程购入的材料
  • 朋友抵押贷款通过我公司名义会怎样
  • 应征进口关税的公式
  • 消费税计算视频讲解
  • 住房公积金证书更新
  • 生产企业出口货物必须以什么为计税依据计算免抵退税额
  • 费用计入资产
  • 企业开增值税普通发票 电子版
  • 2020年运费发票备注栏新规定
  • 股权收购特殊性税务处理案例
  • 赠送的商品怎么入库 企业会计准则
  • php处理json
  • 企业发放职工薪酬的账务处理例子
  • auepuc.exe是什么软件
  • PHP:pg_version()的用法_PostgreSQL函数
  • 冲减其他应收款摘要怎么写
  • swoole如何使用
  • win7系统怎么设置最佳性能
  • php技巧
  • php floor()
  • 不列颠哥伦比亚大学排名
  • 企业员工的工资设定标准
  • 逆回购利息计算公式
  • 结转损益类收入科目
  • 代扣增值税如何做账
  • c#创建web
  • vue.mixin是什么
  • PHP编写简易计算器
  • 如何在idea上运行python
  • 收入调节方式有哪三种
  • 条形码费用属于哪个科目
  • 母公司吸收合并全资子公司
  • sql语句分组汇总
  • 发票红冲操作流程
  • 小规模减免的增值税
  • 运输公司发票抵扣
  • 稳岗返还资金最新账务处理
  • 中级会计需要初级会计证吗
  • 销项税多做了怎么冲
  • 预提短期借款利息的会计科目
  • 员工话费实报实销分录
  • 员工垫付的费用会计分录
  • 现金流量表补充资料怎么理解
  • 废料卖出算哪种收入
  • 企业以原有公司为主体
  • sqlserver索引的作用
  • ubuntu系统安装无线网卡驱动
  • 电脑没有声音怎么恢复按哪个键
  • 如何解决叛逆心理
  • 安装网络设备
  • 如何解决在沟通中产生的漏斗效应
  • Android ViewStub 布局延迟加载
  • ubuntu 20.4安装
  • unity按钮函数
  • python怎么写爬虫
  • Unity3D游戏开发毕业论文
  • python作用域和优先级
  • html做一个新闻app首页
  • 税控系统技术维护费抵税怎么申报
  • 怎样查税务师事务所信息
  • 珠海自助征信查询机
  • 绵阳税务局副局长
  • 地税局公务员工作内容
  • 江西省地税局官方网站
  • 纪检组长如何监督党员
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设