今天在linux内核3.6.11+升级改变了哪些内容的时候,发现了一个网络速度跟踪工具speedometer,安装也比较方便,记下来留作以后使用。

出处:http://excess.org/speedometer/

Purpose

Measure and display the rate of data across a network connection or data being stored in a file.(统计并显示网络或文件的传输速率)

Source

Current version is 2.8 (安装源)

Version 2.8 download tarball          (安装源)

Mercurial repository: https://excess.org/hg/speedometer/

Github mirror: https://github.com/wardi/speedometer

Installation

Debian or Ubuntu  (直接安装)

apt-get install speedometer  

Others

Download and install Urwid (recommended).    (apt安装中自己会下载,不用额外安装)

Download the speedometer source.

As root issue the following commands in the directory that you downloaded the source file:

cp speedometer.py /usr/local/bin/speedometer
chown root: /usr/local/bin/speedometer
chmod 755 /usr/local/bin/speedometer

Usage

Usage: speedometer [options] tap [[-c] tap]...
Monitor network traffic or speed/progress of a file transfer.  At least one
tap must be entered.  -c starts a new column, otherwise taps are piled
vertically.

Taps:
  -f filename [size]          display download speed [with progress bar]
  -r network-interface        display bytes received on network-interface
  -t network-interface        display bytes transmitted on network-interface
  -c                          start a new column for following tap arguments

Options:
  -b                          use old blocky display instead of smoothed
                              display even when UTF-8 encoding is detected
                              (use this if you see strange characters)
  -i interval-in-seconds      eg. "5" or "0.25"   default: "1"
  -k (1|16|88|256)            set the number of colors this terminal
                              supports (default 16)
  -l                          use linear charts instead of logarithmic
                              you will VERY LIKELY want to set -m as well
  -m chart-maximum            set the maximum bytes/second displayed on
                              the chart (default 2^32)
  -n chart-minimum            set the minimum bytes/second displayed on
                              the chart (default 32)
  -p                          use original plain-text display (one tap only)
  -s                          use bits/s instead of bytes/s
  -x                          exit when files reach their expected size
  -z                          report zero size on files that don't exist
                              instead of waiting for them to be created

Usage Examples

How long it will take for my 38MB transfer to finish?       统计文件传输速率,显示一个进度条

speedometer favorite_episode.rm $((38*1024*1024))

How quickly is another transfer going?         

speedometer dl/big.avi

How fast is this LAN?                   

host-a$ cat /dev/zero | nc -l -p 12345

host-b$ nc host-a 12345 > /dev/null 
host-b$ speedometer -rx eth0

How fast is the upstream on this ADSL line? (start an upload first)             宽带上传速率

speedometer -tx ppp0

How fast can I write data to my filesystem? (with at least 1GB free)               硬盘读写速率

dd bs=1000000 count=1000 if=/dev/zero of=big_nothing &
speedometer big_nothing

posted on 2022-07-05 18:13  我在全球村  阅读(104)  评论(0编辑  收藏  举报