今天我们这里来介绍一个工具,bwm-ng,这个小工具可以来帮我们监控系统的一些性能,比如实时的网络流量,磁盘的读写速度,
下面来看下:
2. 解压缩: tar zxvf bwm-ng=0.6.tar.gz
3. 安装:1.configure
2. make
3. make install
上面安装完了之后,就可以来试验下效果了。。。嘿嘿
请看下面截图:
上面是监控网络的信息:命令如下:
[root@localhost src]# bwm-ng -u bytes
下面在贴张看磁盘的截图和命令:
bwm-ng -u bytes -i disk
bwm-ng 还有好多选项,还支持各种方式的输入,包括各种图形界面的报告,CVS格式的文件等,有时间的朋友可以研究下
[root@localhost src]# bwm-ng -h
Bandwidth Monitor NG (bwm-ng) v0.6
Copyright (C) 2004-2007 Volker Gropp <bwmng@gropp.org>
USAGE: bwm-ng [OPTION] ... [CONFIGFILE]
displays current ethernet interfaces stats
Options:
-t, --timeout <msec> displays stats every <msec> (1msec = 1/1000sec)
default: 500
-d, --dynamic [value] show values dynamicly (Byte KB or MB)
-a, --allif [mode] where mode is one of:
0=show only up (and selected) interfaces
1=show all up interfaces (default)
2=show all and down interfaces
-I, --interfaces <list> show only interfaces in <list> (comma seperated), or
if list is prefaced with % show all but interfaces
in list
-S, --sumhidden [value] count hidden interfaces for total
-A, --avglength <sec> sets the span of average stats (Default 30s)
-D, --daemon [value] fork into background and daemonize
-h, --help displays this help
-V, --version print version info
Input:
-i, --input <method> input method, one of: proc netstat disk
-f, --procfile <file> filename to read raw data from. (/proc/net/dev)
--diskstatsfile <file> filename to read diskstats (Linux 2.6+) from. (/proc/diskstats)
--partitionsfile <file> filename to read diskstats (Linux 2.4) from. (/proc/partitions)
Output:
-o, --output <method> output method, one of:
plain, curses, curses2, csv, html
-u, --unit <value> unit to show. one of bytes, bits, packets, errors
-T, --type <value> type of stats. one of rate, max, sum, avg
-C, --csvchar <char> delimiter for csv
-F, --outfile <file> output file for csv and html (default stdout)
-R, --htmlrefresh <num> meta refresh for html output
-H, --htmlheader show <html> and <meta> frame for html output
-c, --count <num> number of query/output for plain & csv
-N, --ansiout disable ansi codes for plain output
(ie 1 for one single output)
[root@localhost src]#
上面是各项参数的详细介绍,各位也可以到官网上去看手册,希望对大家的工作和学有帮助。。。
本文转自你是路人甲还是霍元甲博客51CTO博客,原文链接http://blog.51cto.com/world77/566126如需转载请自行联系原作者
world77