speedometer出网络图`很小很强大~
今天在强大的网络上发先一个很小很强大的软件,出图效果很不错~~所以介绍给大家。`安装很方便“只要你的系统支持 python 但是如果你没有安装 python-urwid 不会出图,只会有数字显示~~好了下面讲安装~~
PS :需要 python 2.6 以上支持~
shell $> wget http://excess.org/speedometer/speedometer.py
shell $> apt-get install python-urwid
shell $> cp speedometer.py /usr/local/bin/speedometer
shell $> chown root: /usr/local/bin/speedometer
shell $> chmod 755 /usr/local/bin/speedometer
shell $> speedometer.py
/usr/local/bin/speedometer.py:21: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
import popen2
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.
/usr/local/bin/speedometer.py:21: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
import popen2
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]
-f must be used if directly following another
file tap without an expected size specified
-rx network-interface display bytes received on network-interface
-tx network-interface display bytes transmitted on network-interface
[-f] filename [size] display download speed [with progress bar]
-f must be used if directly following another
file tap without an expected size specified
-rx network-interface display bytes received on network-interface
-tx network-interface display bytes transmitted on network-interface
Options:
-i interval-in-seconds eg. “5″ or “0.25″ default: “1″
-p use plain-text display (one tap only)
-b use old blocky display instead of smoothed
display even when UTF-8 encoding is detected
-z report zero size on files that don’t exist
instead of waiting for them to be created
-i interval-in-seconds eg. “5″ or “0.25″ default: “1″
-p use plain-text display (one tap only)
-b use old blocky display instead of smoothed
display even when UTF-8 encoding is detected
-z report zero size on files that don’t exist
instead of waiting for them to be created
Python Version: 2.6
Urwid >= 0.8.9 detected: yes Urwid >= 0.9.1 and UTF-8 encoding detected: yes
Urwid >= 0.8.9 detected: yes Urwid >= 0.9.1 and UTF-8 encoding detected: yes
##上面是帮助~~~
shell $> speedometer.py -rx eth0 -c -tx eth0
显示如图:

还可以测试磁盘读写速度出图“:
shell $> dd if=/dev/zero of=big_nothing bs=102M count=3 &
##注意我是在虚拟机上所以用了小文件,如果你在服务器可以创建一个大文件,这样测试才有效果~
shell $> speedometer.py big_nothing

评论 (0)
Trackbacks (0)
发表评论
Trackback
近期评论