`
liudaoru
  • 浏览: 1559434 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

nuttcp(8) - 网络测速工具

 
阅读更多

http://linux.die.net/man/8/nuttcp

 

 

Name

nuttcp - network performance measurement tool

Synopsis

nuttcp -h
nuttcp -V
nuttcp -t
 [ -bdDsuv ] [ -cdscp_value ] [ -lbuffer_len ] [ -nnum_bufs ]

-wwindow_size ] [ -wsserver_window ] [ -wb ]
-pdata_port ] [ -Pcontrol_port ]
-Nnum_streams ] [ -Rxmit_rate_limit [m|g] ]
-Txmit_timeout [m] ] host [ < input ]
nuttcp -r [ -bBdsuv ] [ -cdscp_value ] [ -lbuffer_len ] [ -nnum_bufs ]
-wwindow_size ] [ -wsserver_window ] [ -wb ]
-pdata_port ] [ -Pcontrol_port ]
-Nnum_streams ] [ -Rxmit_rate_limit [m|g] ]
-Txmit_timeout [m] ] [ host ] [ > output ]
nuttcp -S [ -Pcontrol_port ]
nuttcp -1
 [ -Pcontrol_port ]

Description

nuttcp is a network performance measurement tool intended for use by network and system managers. Its most basic usage is to determine the raw TCP (or UDP) network layer throughput by transferring memory buffers from a source system across an interconnecting network to a destination system, either transferring data for a specified time interval, or alternatively transferring a specified number of buffers. In addition to reporting the achieved network throughput in Mbps, nuttcp also provides additional useful information related to the data transfer such as user, system, and wall-clock time, transmitter and receiver CPU utilization, and loss percentage (for UDP transfers).

nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release. nuttcp has several useful features beyond those of the basic ttcp/nttcp, such as a server mode, rate limiting, multiple parallel streams, and timer based usage. nuttcp is also continuing to evolve to meet new requirements that arise and to add desired new features. nuttcp has been successfully tested and used on a variety of Solaris, SGI, and PPC/X86 Linux systems, and should probably work fine on most flavors of Unix.

There are two basic modes of operation for nuttcp. The original or classic mode is the transmitter/receiver mode, which is also the way the original ttcp and nttcp worked. In this mode, a receiver is first initiated on the destination host using "nuttcp -r", and then a transmitter must be started on the source host using "nuttcp -t". This mode is somewhat deprecated and is no longer recommended for general use. The preferred and recommended mode of operation for nuttcp is the new client/server mode. With this mode, a server is first started on one system using "nuttcp -S" (or "nuttcp -1"), and then a client may either transmit data to (using "nuttcp -t") or receive data from (using "nuttcp -r") the server system. All the information provided by nuttcp is reported by the client, including the information from the server, thus providing a full snapshot of both the transmitter and receiver ends of the data transfer.

The server may be started by a normal, non-privileged user by issuing either a "nuttcp -S" or a "nuttcp -1" command. However, the optimal and recommended method of running a server is to run "nuttcp -S" via the inetd/xinetd daemon. This method has several significant advantages, including being more robust, allowing multiple simultaneous connections, and providing for access control over who is allowed to use the nuttcp server via the hosts.allow (and hosts.deny) file. By default, the nuttcp server listens for commands on port 5000, and the actual nuttcp data transfers take place on port 5001.

The host parameter must be specified for the transmitter, and provides the host name or IP address of the receiver. In classic transmitter/receiver mode, the host parameter may not be specified for the receiver. In client/server mode, when the client is the receiver, the host parameter specifies the host name or IP address of the transmitter (server).

Normally, a nuttcp data transfer is memory-to-memory. However, by using the "-s" option, it is possible to also perform memory-to-disk, disk-to-memory, and disk-to-disk data transfers. Using the "-s" option with the transmitter will cause nuttcp to read its data from the standard input instead of using a prefabricated memory buffer, while using the "-s" option on the receiver causes nuttcp to write its data to standard output. All these types of data transfers are possible with the classic transmitter/receiver mode. For security reasons, the "-s" option is disabled on the server, so it is not possible to access the disk on the server side of a data transfer.

The allowed options to nuttcp are:

Options

-h

Print out a usage statement. Running nuttcp with no arguments will also produce a usage statement.

-V

Prints the nuttcp version number. The nuttcp version is also printed as part of the normal nuttcp output when the "-v" verbose output is used (but not when using the default brief output). In client/server mode, the version number of both the client and server is identified.

-t

Indicates that this nuttcp is the transmitter. In client/server mode, this means the server specified by the host parameter is the receiver.

-r

Indicates that this nuttcp is the receiver. In client/server mode, this means the server specified by the host parameter is the transmitter.

-S

Indicates that this nuttcp is the server. The only option that may be specified to the server is the "-P" option, which allows one to change the control port used by the server, but only when the server is started by a normal, non-privileged user. When the server is initiated by inetd/xinetd, the server control port should be specified in the services file.

-1

Basically the same as the "-S" option, but indicates a one-shot server, i.e. the server exits after the first data transfer initiated by a client. The "-1" option should only be used when the server is started by a normal, non-privileged user. This option will probably rarely need to be used, but can be useful for a quick test and eliminates the possibilty of leaving a non-access controlled nuttcp server running on the system (which can happen when using the "-S" option and forgetting to kill the nuttcp server after finishing a series of tests).

-b

Produce brief one-line output, which includes the amount of data transferred in MB (1024**2 bytes), the time interval in seconds, the TCP (or UDP) network throughput in Mbps (millions of bits per second), the transmitter and/or receiver CPU utilization, and for UDP data transfers also outputs the loss percentage. In client/server mode, most of the printed statistics are from the viewpoint of the receiver. This is the default output format.

-B

This option is only valid for the receiver, and forces the receiver to read a full buffer (as specified by the "-l" buffer length option) from the network. It is mainly intended to be used with the "-s" option to only output full buffers to standard output (e.g. for use with tar). It is also implicitly set whenever the number of streams as specified by the "-N" option is greater than 1. This option is not passed to the server.

-d

For TCP data transfers, sets the SO_DEBUG option on the data socket. This option is not passed to the server. It is a rarely used option which may possibly be removed or renamed in a future version of nuttcp.

-D

This option is only valid for the transmitter, and only for TCP data transfers, in which case it sets the TCP_NODELAY option on the data socket, which turns off the Nagle algorithm causing data packets to be sent as soon as possible without introducing any unnecessary delays. This option is not passed to the server. It is a rarely used option which may possibly be removed or renamed in a future version of nuttcp.

-s

Setting the "-s" option causes nuttcp to either read its data from standard input rather than using prefabricated memory buffers (for "nuttcp -t"), or to write its data out to standard output (for "nuttcp -r"). The "-s" option is disabled for security reasons on the server.

-u

Use UDP for the data transfer instead of the default of TCP.

-v

Verbose output that provides some additional information related to the data transfer. In client/server mode, the server is always verbose (implicit "-v" option), but the client controls the extent and type of output via the "-v" and "-b" options.

-cdscp_value
Sets the socket option to support COS. Either takes a dscp value or with the t|T modifier it takes the full TOS field.
-lbuffer_len
Length of the network write/read buffer in bytes for the transmitter/receiver. It defaults to 64 KB (65536) for TCP data transfers and to 8 KB (8192) for UDP. For client/server mode, it sets both the client and server buffer lengths.
-nnum_bufs
Specifies the number of source buffers written to the network (default is unlimited), and is ignored by the receiver. For client/server mode, if the client issues a "nuttcp -r" command making it the receiver, this parameter is passed to the server since the server is the transmitter in this case. This parameter is also ignored if the "-s" parameter is specified to the transmitter.
-wwindow_size
Indicates the window size in KB of the transmitter (for "nuttcp -t") or receiver (for "nuttcp -r"). Actually, to be technically correct, it sets the sender or receiver TCP socket buffer size, which then effectively sets the window size. For client/server mode, both the transmitter and receiver window sizes are set. The default window size is architecture and system dependent. Note recent Linux systems, out of a misguided desire to be helpful, double whatever window size is actually specified by the user (this is not a bug with nuttcp but a bug/feature of the Linux kernel). Also, with these Linux systems, the actual window size that's used on the intervening network, as observed with tcpdump, is greater than the requested window size, but less than the doubled value set by Linux.
-wsserver_window
For client/server mode, the "-ws" option provides a mechanism for setting a different window size on the server than the client window size as specified with the "-w" option.
-wb

Normally, to conserve memory, the transmitter only sets the TCP send socket buffer size and the receiver only sets the TCP receive socket buffer size. However, if the "-wb" option is used, the transmitter will also set the TCP receive socket buffer size and the receiver will also set the TCP send socket buffer size. Under normal circumstances, this should never be necessary. This option was implemented because certain early braindead Solaris 2.8 systems would not properly set the TCP window size unless both the TCP send and receive socket buffer sizes were set (later Solaris 2.8 systems have corrected this deficiency). Thus the 'b' in this option can stand either for "braindead" or "both".

-pdata_port
Port number used for the data connection, which defaults to port 5001. If multiple streams are specified with the "-N" option, the "-p" option specifies the starting port number for the data connection. For example, if four streams are specified using the default data connection port number, nuttcp will use ports 5001, 5002, 5003, and 5004 for the four TCP (or UDP) connections used to perform the data transfer.
-Pcontrol_port
For client/server mode, specifies the port number used for the control connection between the client and server, and defaults to port 5000. On the server side, the "-P" option should only be used when the server is started manually by the user. If the server is started by inetd/xinetd (the preferred method), the control connection must be specified by adding a nuttcp entry to the services file.
-Nnum_streams
Species the number of parallel TCP (or UDP) data streams to be used for the data transfer, with the default being a single data stream. The maximum number of parallel data streams that can be used is 128. If the number of streams is greater than one, the "-B" option is implicitly set. The current implementation does not fork off separate processes for each data stream, so specifying multiple streams on an SMP machine will not take advantage of its multiple processors. Of course it is always possible to run multiple nuttcp commands in parallel on an SMP system to determine if there is any advantage to running on multiple processors. This is especially simple to do when running in client/server mode when the server is started from the inetd/xinetd daemon. When running multiple nuttcp commands in parallel, the "-T" transmitter timeout option may be used to insure that all the nuttcp commands finish at approximately the same time.
-Rxmit_rate_limit[m|g]
The transmitter rate limit throttles the speed at which the transmitter sends data to the network, and by default is in Kbps, although the 'm' or 'g' suffix may be used to specify Mbps or Gbps. This option may be used with either TCP or UDP data streams. Because of the way this option is currently implemented, it will consume all the available CPU on the transmitter side of the connection so the "%TX" stats are not meaningful when using the rate limit option. By default the rate limit is applied to the average rate of the data transfer in real time, and not in CPU time, so if nuttcp is switched out of the processor for any reason, when it is switched back in, it is possible that the instantaneous rate may momentarily exceed the specified value. There is an 'i' qualifier to the rate limit option (specified as "-Ri") that will restrict the instantaneous rate at any given point in time to the specified value, although in this case the final rate reported by nuttcp may be less than the specified value since nuttcp won't attempt to catch up if other processes gain control of the CPU. The default is no rate limit. Note another way to throttle the throughput of TCP data streams is to reduce the window size.
-Txmit_time_limit[m]
Limits the amount of time that the transmitter will send data to the specified number of seconds, or number of minutes if the 'm' suffix is used. Normally a data transfer will either specify a fixed amount of data to send using the "-n" option, or a fixed period of time to send using the "-T" option. However, if both the "-n" and "-T" options are used, the data transfer will be stopped by whichever option takes affect first. The default is a 10 second time limit for the data transfer.

Usage

Under Construction

For now, consult the README file for basic usage guidelines.

Examples

Under Construction

For now, see the examples.txt file for some examples of using nuttcp.

See Also

ping(8), traceroute(8), tracepath(8), pathchar(8), netstat(1), mtrace(8)

Authors

Developed by Bill Fink based on nttcp which in turn was an enhancement of the original ttcp developed by Mike Muuss at BRL. IPv6 capability and some other fixes and enhancements contributed by Rob Scott. Many useful suggestions and testing performed by Phil Dykstra and others.

The current version is available via anonymous ftp from:

ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp/
The authors can be reached at nuttcp@lcp.nrl.navy.mil.

Bugs

Please send bug reports to nuttcp-bugs@lcp.nrl.navy.mil.

分享到:
评论

相关推荐

    nuttcp-probe-smokeping:Nuttcp IP吸烟性能探头

    nuttcp探针烟熏的IP性能探头 。 可用于简单的带宽测量,或使用不同的特性来模拟不同类型的IP流量。 例如用于SIP的RTP媒体,不同QoS类别内的性能等。 设置测试时,请进行一些计算,以便您确信它们不会重叠。 如果对...

    iperf:iperf3:一种TCP,UDP和SCTP网络带宽测量工具

    iperf3还具有其他工具(例如nuttcp和netperf)中发现的许多功能,但是原始iperf中却没有这些功能。 例如,其中包括零复制模式和可选的JSON输出。 注意,iperf3与原始iperf向后不兼容。 iperf3的主要开发在CentOS ...

    goben:goben是一个golang工具,用于测量主机之间的TCPUDP传输层吞吐量

    戈本 goben是一个golang工具,用于测量主机之间的TCP / UDP传输层吞吐量。... 后来我找到了另一个名为nuttcp的惊人工具。 可以在这里阅读有关nepim和nuttcp的信息: nepim和nuttcp 。 goben旨在解决nepim的缺点:

    高级色系PPT11.pptx

    高级色系PPT11.pptx

    node-v7.9.0-linux-x86.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    基于tensorflow的的cnn卷积神经网络的图像识别分类

    【作品名称】:基于tensorflow的的cnn卷积神经网络的图像识别分类 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。

    ### 数据分析概念、使用技巧、优缺点的文章

    数据分析是指通过收集、清洗、处理和解释数据,以发现其中的模式、趋势和关联,从而提供决策支持或洞察见解的过程。它在各行各业中都扮演着至关重要的角色,从市场营销到科学研究,从金融领域到医疗保健,都有广泛的应用。

    对微信帐单进行数据分析

    #pip install pandas -i https://mirrors.aliyun.com/pypi/simple #安装pandas处理数据模块 #pip install xlwt -i https://mirrors.aliyun.com/pypi/simple #安装excel模块 #pip install openpyxl #从微信导出对帐帐单 import pandas as pd #引入pandas,重命名为pd,Python3.9.10版本的Pandas无法兼容低版本的xls import numpy as np #导入均值模块 #从第17行读取csv格式的帐单 df = pd.read_csv('微信支付账单(20230101-20230401).csv',header=16) #分析数据 ...... #将分析数据另存为out.xlsx ..... #进行交易进间分析 ...... #统计交易对方 ...... #将结果保存到excel ..... writer.close()

    node-v7.2.0-sunos-x86.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    作业.docx

    作业.docx

    DB23∕T 2540-2019 智慧城市建设项目可行性研究报告.pdf

    DB23∕T 2540-2019 智慧城市建设项目可行性研究报告.pdf

    在CentOS系统上安装Docker 步骤

    附件是在CentOS系统上安装Docker 步骤,仅供交流学习使用,无任何商业目的! 在执行这些步骤之前,请确保你的CentOS系统已经更新到最新,并且你了解Docker容器技术的相关概念。如果你在安装过程中遇到任何问题,可以查看Docker的官方文档或搜索相关的错误信息。

    node-v0.12.3-x64.msi

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    蜂群系统链性态网体系化作战矩阵.txt

    蜂群系统链性态网体系化作战矩阵.txt

    高分毕业设计 基于STM32单片机的智能鱼缸设计源代码+原理图+器件清单+实物焊接效果+项目资料齐全.zip

    【资源概览】 高分毕业设计 基于STM32单片机的智能鱼缸设计源代码+原理图+器件清单+实物焊接效果+项目资料齐全.zip高分毕业设计 基于STM32单片机的智能鱼缸设计源代码+原理图+器件清单+实物焊接效果+项目资料齐全.zip高分毕业设计 基于STM32单片机的智能鱼缸设计源代码+原理图+器件清单+实物焊接效果+项目资料齐全.zip 【资源说明】 高分项目源码:此资源是在校高分项目的完整源代码,经过导师的悉心指导与认可,答辩评审得分高达95分,项目的质量与深度有保障。 测试运行成功:所有的项目代码在上传前都经过了严格的测试,确保在功能上完全符合预期,您可以放心下载并使用。 适用人群广泛:该项目不仅适合计算机相关专业(如电子信息、物联网、通信工程、自动化等)的在校学生和老师,还可以作为毕业设计、课程设计、作业或项目初期立项的演示材料。对于希望进阶学习的小白来说,同样是一个极佳的学习资源。 代码灵活性高:如果您具备一定的编程基础,可以在此代码基础上进行个性化的修改,以实现更多功能。当然,直接用于毕业设计、课程设计或作业也是完全可行的。 欢迎下载,与我一起交流学习,共同进步!

    ### 这是一篇对Qt开发进行了详细概述的文章

    Qt是一套跨平台的C++应用程序开发框架,被广泛应用于开发图形用户界面(GUI)程序、嵌入式系统、移动设备应用等领域。它提供了丰富的类库和工具,使得开发者可以快速构建功能强大、美观易用的应用程序。以下是一个涵盖Qt开发的教程和案例的综合描述。

    高分项目 基于STM32单片机的电子血压计设计源代码+项目资料齐全+教程文档.zip

    【资源概览】 高分项目 基于STM32单片机的电子血压计设计源代码+项目资料齐全+教程文档.zip高分项目 基于STM32单片机的电子血压计设计源代码+项目资料齐全+教程文档.zip高分项目 基于STM32单片机的电子血压计设计源代码+项目资料齐全+教程文档.zip 【资源说明】 高分项目源码:此资源是在校高分项目的完整源代码,经过导师的悉心指导与认可,答辩评审得分高达95分,项目的质量与深度有保障。 测试运行成功:所有的项目代码在上传前都经过了严格的测试,确保在功能上完全符合预期,您可以放心下载并使用。 适用人群广泛:该项目不仅适合计算机相关专业(如电子信息、物联网、通信工程、自动化等)的在校学生和老师,还可以作为毕业设计、课程设计、作业或项目初期立项的演示材料。对于希望进阶学习的小白来说,同样是一个极佳的学习资源。 代码灵活性高:如果您具备一定的编程基础,可以在此代码基础上进行个性化的修改,以实现更多功能。当然,直接用于毕业设计、课程设计或作业也是完全可行的。 欢迎下载,与我一起交流学习,共同进步!

    node-v7.1.0-linux-x86.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    基于深度神经网络的图像分类任务.zip

    基于深度神经网络的图像分类任务.zip

    基于 Flask 发布的深度学习 web 服务.zip

    基于 Flask 发布的深度学习 web 服务.zip

Global site tag (gtag.js) - Google Analytics