音效素材网提供各类素材,打造精品素材网站!

站内导航 站长工具 投稿中心 手机访问

音效素材

Linux系统下查看网络接口数据信息的命令总结
日期:2015-12-18 11:44:24   来源:脚本之家

监视网络接口TCP状态信息数据有多种工具或命令。下面举例一些:
nstat命令

复制代码
代码如下:

# nstat
#kernel
IpInReceives 9733104 0.0
IpInDelivers 9733102 0.0
IpOutRequests 9058593 0.0
IcmpInErrors 2147 0.0
IcmpInCsumErrors 1143 0.0
IcmpInDestUnreachs 2 0.0
IcmpInTimeExcds 1361 0.0
IcmpInParmProbs 56 0.0
IcmpInRedirects 1 0.0
IcmpInEchoReps 701 0.0
IcmpInTimestamps 26 0.0
IcmpOutErrors 750 0.0
IcmpOutTimeExcds 23 0.0
IcmpOutEchoReps 26 0.0
IcmpOutTimestamps 701 0.0
IcmpMsgInType0 26 0.0
IcmpMsgInType3 1361 0.0
IcmpMsgInType4 1 0.0
IcmpMsgInType8 701 0.0
IcmpMsgInType11 56 0.0
IcmpMsgOutType0 701 0.0
IcmpMsgOutType3 23 0.0
IcmpMsgOutType8 26 0.0
TcpActiveOpens 678940 0.0
TcpPassiveOpens 910289 0.0
TcpAttemptFails 58018 0.0
TcpEstabResets 14608 0.0
TcpInSegs 9686518 0.0
TcpOutSegs 9038288 0.0
TcpRetransSegs 6700 0.0
TcpInErrs 47 0.0
TcpOutRsts 67249 0.0
UdpInDatagrams 44409 0.0
UdpNoPorts 23 0.0
UdpOutDatagrams 44441 0.0
Ip6InReceives 6 0.0
Ip6InNoRoutes 6 0.0
Ip6OutRequests 9 0.0
Ip6OutNoRoutes 3948 0.0
Ip6OutMcastPkts 14 0.0
Ip6InOctets 432 0.0
Ip6OutOctets 612 0.0
Ip6OutMcastOctets 992 0.0
Ip6InNoECTPkts 6 0.0
Icmp6OutMsgs 9 0.0
Icmp6OutRouterSolicits 3 0.0
Icmp6OutNeighborSolicits 1 0.0
Icmp6OutMLDv2Reports 5 0.0
Icmp6OutType133 3 0.0
Icmp6OutType135 1 0.0
Icmp6OutType143 5 0.0
TcpExtSyncookiesFailed 140 0.0
TcpExtEmbryonicRsts 704 0.0
TcpExtPruneCalled 23 0.0
TcpExtTW 615681 0.0
TcpExtPAWSEstab 20 0.0
TcpExtDelayedACKs 52123 0.0
TcpExtDelayedACKLocked 44 0.0
TcpExtDelayedACKLost 1518 0.0
TcpExtListenDrops 32 0.0
TcpExtTCPPrequeued 19258 0.0
TcpExtTCPDirectCopyFromBacklog 45185 0.0
TcpExtTCPDirectCopyFromPrequeue 394312 0.0
TcpExtTCPHPHits 943072 0.0
TcpExtTCPHPHitsToUser 3478 0.0
TcpExtTCPPureAcks 3242625 0.0
TcpExtTCPHPAcks 547259 0.0
TcpExtTCPSackRecovery 650 0.0
TcpExtTCPFACKReorder 1 0.0
TcpExtTCPSACKReorder 8 0.0
TcpExtTCPTSReorder 23 0.0
TcpExtTCPFullUndo 1 0.0
TcpExtTCPPartialUndo 23 0.0
TcpExtTCPDSACKUndo 1 0.0
TcpExtTCPLossUndo 854 0.0
TcpExtTCPLostRetransmit 162 0.0
TcpExtTCPSackFailures 135 0.0
TcpExtTCPLossFailures 18 0.0
TcpExtTCPFastRetrans 1517 0.0
TcpExtTCPForwardRetrans 104 0.0
TcpExtTCPSlowStartRetrans 172 0.0
TcpExtTCPTimeouts 2764 0.0
TcpExtTCPLossProbes 5201 0.0
TcpExtTCPLossProbeRecovery 2858 0.0
TcpExtTCPSackRecoveryFail 74 0.0
TcpExtTCPRcvCollapsed 460 0.0
TcpExtTCPDSACKOldSent 1645 0.0
TcpExtTCPDSACKOfoSent 21 0.0
TcpExtTCPDSACKRecv 879 0.0
TcpExtTCPAbortOnData 4314 0.0
TcpExtTCPAbortOnClose 346 0.0
TcpExtTCPAbortOnTimeout 186 0.0
TcpExtTCPDSACKIgnoredNoUndo 615 0.0
TcpExtTCPSpuriousRTOs 95 0.0
TcpExtTCPSackShifted 402 0.0
TcpExtTCPSackMerged 2048 0.0
TcpExtTCPSackShiftFallback 2592 0.0
TcpExtTCPRcvCoalesce 145162 0.0
TcpExtTCPOFOQueue 36672 0.0
TcpExtTCPOFOMerge 21 0.0
TcpExtTCPChallengeACK 329 0.0
TcpExtTCPSYNChallenge 47 0.0
IpExtInNoRoutes 2 0.0
IpExtInOctets 1568628267 0.0
IpExtOutOctets 1158526375 0.0
IpExtInNoECTPkts 9828130 0.0
IpExtInECT0Pkts 10 0.0
IpExtInCEPkts 3 0.0

ss命令

复制代码
代码如下:

# ss -s
Total: 319 (kernel 752)
TCP: 187 (estab 114, closed 58, orphaned 0, synrecv 0, timewait 58/0), ports 0

Transport Total IP IPv6
* 752 - -
RAW 0 0 0
UDP 3 2 1
TCP 129 113 16
INET 132 115 17
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 9001 0 2194916 0 0 0 1424609 0 0 0 BMRU
lo 65536 0 7670598 0 0 0 7670598 0 0 0 LRU</p> <p># netstat -s
Ip:
9743496 total packets received
0 forwarded
0 incoming packets discarded
9743494 incoming packets delivered
9068146 requests sent out
Icmp:
2147 ICMP messages received
1143 input ICMP message failed.
InCsumErrors: 2
ICMP input histogram:
destination unreachable: 1361
timeout in transit: 56
source quenches: 1
echo requests: 701
echo replies: 26
750 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 23
echo request: 26
echo replies: 701
IcmpMsg:
InType0: 26
InType3: 1361
InType4: 1
InType8: 701
InType11: 56
OutType0: 701
OutType3: 23
OutType8: 26
Tcp:
679665 active connections openings
911387 passive connection openings
58018 failed connection attempts
14608 connection resets received
118 connections established
9696894 segments received
9047825 segments send out
6700 segments retransmited
47 bad segments received.
67249 resets sent
Udp:
44425 packets received
23 packets to unknown port received.
0 packet receive errors
44457 packets sent
UdpLite:
TcpExt:
140 invalid SYN cookies received
704 resets received for embryonic SYN_RECV sockets
23 packets pruned from receive queue because of socket buffer overrun
616402 TCP sockets finished time wait in fast timer
20 packets rejects in established connections because of timestamp
52124 delayed acks sent
45 delayed acks further delayed because of locked socket
Quick ack mode was activated 1519 times
32 SYNs to LISTEN sockets dropped
19258 packets directly queued to recvmsg prequeue.
45185 bytes directly in process context from backlog
394312 bytes directly received in process context from prequeue
943942 packet headers predicted
3478 packets header predicted and directly queued to user
3246338 acknowledgments not containing data payload received
547737 predicted acknowledgments
650 times recovered from packet loss by selective acknowledgements
Detected reordering 1 times using FACK
Detected reordering 8 times using SACK
Detected reordering 23 times using time stamp
1 congestion windows fully recovered without slow start
23 congestion windows partially recovered using Hoe heuristic
1 congestion windows recovered without slow start by DSACK
854 congestion windows recovered without slow start after partial ack
TCPLostRetransmit: 162
135 timeouts after SACK recovery
18 timeouts in loss state
1517 fast retransmits
104 forward retransmits
172 retransmits in slow start
2764 other TCP timeouts
TCPLossProbes: 5202
TCPLossProbeRecovery: 2859
74 SACK retransmits failed
460 packets collapsed in receive queue due to low socket buffer
1646 DSACKs sent for old packets
21 DSACKs sent for out of order packets
879 DSACKs received
4314 connections reset due to unexpected data
346 connections reset due to early user close
186 connections aborted due to timeout
TCPDSACKIgnoredNoUndo: 615
TCPSpuriousRTOs: 95
TCPSackShifted: 402
TCPSackMerged: 2048
TCPSackShiftFallback: 2592
TCPRcvCoalesce: 145187
TCPOFOQueue: 36673
TCPOFOMerge: 21
TCPChallengeACK: 329
TCPSYNChallenge: 47
IpExt:
InNoRoutes: 2
InOctets: 1570012766
OutOctets: 1159491497
InNoECTPkts: 9838700
InECT0Pkts: 10
InCEPkts: 3

ip命令

复制代码
代码如下:

# ip -s link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
883395575 7672258 0 0 0 0
TX: bytes packets errors dropped carrier collsns
883395575 7672258 0 0 0 0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 02:7a:7d:d2:f7:21 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
694754381 2197268 0 0 0 0
TX: bytes packets errors dropped carrier collsns
296980409 1425257 0 0 0 0

sar命令

复制代码
代码如下:

# sar -n DEV 1
Linux 3.13.0-48-generic (beta) 2015年08月17日 _x86_64_ (4 CPU)

14时46分54秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil
14时46分55秒 eth0 12.00 5.00 0.97 1.18 0.00 0.00 0.00 0.00
14时46分55秒 lo 10.00 10.00 1.00 1.00 0.00 0.00 0.00 0.00

14时46分55秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil
14时46分56秒 eth0 1.00 1.00 0.05 0.47 0.00 0.00 0.00 0.00
14时46分56秒 lo 16.00 16.00 2.17 2.17 0.00 0.00 0.00 0.00

14时46分56秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil
14时46分57秒 eth0 5.00 3.00 0.26 0.61 0.00 0.00 0.00 0.00
14时46分57秒 lo 10.00 10.00 1.00 1.00 0.00 0.00 0.00 0.00

还有其它工具如nload,iftop等等,不一一列举了。

    您感兴趣的教程

    在docker中安装mysql详解

    本篇文章主要介绍了在docker中安装mysql详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编...

    详解 安装 docker mysql

    win10中文输入法仅在桌面显示怎么办?

    win10中文输入法仅在桌面显示怎么办?

    win10系统使用搜狗,QQ输入法只有在显示桌面的时候才出来,在使用其他程序输入框里面却只能输入字母数字,win10中...

    win10 中文输入法

    一分钟掌握linux系统目录结构

    这篇文章主要介绍了linux系统目录结构,通过结构图和多张表格了解linux系统目录结构,感兴趣的小伙伴们可以参考一...

    结构 目录 系统 linux

    PHP程序员玩转Linux系列 Linux和Windows安装

    这篇文章主要为大家详细介绍了PHP程序员玩转Linux系列文章,Linux和Windows安装nginx教程,具有一定的参考价值,感兴趣...

    玩转 程序员 安装 系列 PHP

    win10怎么安装杜比音效Doby V4.1 win10安装杜

    第四代杜比®家庭影院®技术包含了一整套协同工作的技术,让PC 发出清晰的环绕声同时第四代杜比家庭影院技术...

    win10杜比音效

    纯CSS实现iOS风格打开关闭选择框功能

    这篇文章主要介绍了纯CSS实现iOS风格打开关闭选择框,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作...

    css ios c

    Win7如何给C盘扩容 Win7系统电脑C盘扩容的办法

    Win7如何给C盘扩容 Win7系统电脑C盘扩容的

    Win7给电脑C盘扩容的办法大家知道吗?当系统分区C盘空间不足时,就需要给它扩容了,如果不管,C盘没有足够的空间...

    Win7 C盘 扩容

    百度推广竞品词的投放策略

    SEM是基于关键词搜索的营销活动。作为推广人员,我们所做的工作,就是打理成千上万的关键词,关注它们的质量度...

    百度推广 竞品词

    Visual Studio Code(vscode) git的使用教程

    这篇文章主要介绍了详解Visual Studio Code(vscode) git的使用,小编觉得挺不错的,现在分享给大家,也给大家做个参考。...

    教程 Studio Visual Code git

    七牛云储存创始人分享七牛的创立故事与

    这篇文章主要介绍了七牛云储存创始人分享七牛的创立故事与对Go语言的应用,七牛选用Go语言这门新兴的编程语言进行...

    七牛 Go语言

    Win10预览版Mobile 10547即将发布 9月19日上午

    微软副总裁Gabriel Aul的Twitter透露了 Win10 Mobile预览版10536即将发布,他表示该版本已进入内部慢速版阶段,发布时间目...

    Win10 预览版

    HTML标签meta总结,HTML5 head meta 属性整理

    移动前端开发中添加一些webkit专属的HTML5头部标签,帮助浏览器更好解析HTML代码,更好地将移动web前端页面表现出来...

    移动端html5模拟长按事件的实现方法

    这篇文章主要介绍了移动端html5模拟长按事件的实现方法的相关资料,小编觉得挺不错的,现在分享给大家,也给大家...

    移动端 html5 长按

    HTML常用meta大全(推荐)

    这篇文章主要介绍了HTML常用meta大全(推荐),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参...

    cdr怎么把图片转换成位图? cdr图片转换为位图的教程

    cdr怎么把图片转换成位图? cdr图片转换为

    cdr怎么把图片转换成位图?cdr中插入的图片想要转换成位图,该怎么转换呢?下面我们就来看看cdr图片转换为位图的...

    cdr 图片 位图

    win10系统怎么录屏?win10系统自带录屏详细教程

    win10系统怎么录屏?win10系统自带录屏详细

    当我们是使用win10系统的时候,想要录制电脑上的画面,这时候有人会想到下个第三方软件,其实可以用电脑上的自带...

    win10 系统自带录屏 详细教程

    + 更多教程 +
    Windows系统Linux系统苹果MACAndroidiOS系统鸿蒙系统