iftop和iostat安装和简单使用
2014-05-11 17:00
453 查看
1、安装
安装依赖包,yum install flex byacc libpcap ncurses ncurses-devel libpcap-devel
上传到linux安装包,可以使用crt中的put命令上传,解压可能需要用到unzip、tar命令,其中解压gz2参数是jxvf,gz的是zxvf
安装,先编译,在解压的目录下执行:./configure 然后make && make install
2、使用
其中iftop
iftop: display bandwidth usage on an interface by host
Synopsis: iftop -h | [-npbBP] [-i interface] [-f filter code] [-N net/mask]
-h display this message
-n don't do hostname lookups
-N don't convert port numbers to services
-p run in promiscuous mode (show traffic between other
hosts on the same network segment)
-b don't display a bar graph of traffic
-B Display bandwidth in bytes
-i interface listen on named interface
-f filter code use filter code to select packets to count
(default: none, but only IP packets are counted)
-F net/mask show traffic flows in/out of network
-P show ports as well as hosts
-m limit sets the upper limit for the bandwidth scale
-c config file specifies an alternative configuration file
sar的帮助
Usage: sar [ options... ] [ <interval> [ <count> ] ]
Options are:
[ -A ] [ -b ] [ -B ] [ -c ] [ -d ] [ -i <interval> ] [ -p ] [ -q ]
[ -r ] [ -R ] [ -t ] [ -u ] [ -v ] [ -V ] [ -w ] [ -W ] [ -y ]
[ -I { <irq> | SUM | ALL | XALL } ] [ -P { <cpu> | ALL } ]
[ -n { DEV | EDEV | NFS | NFSD | SOCK | ALL } ]
[ -x { <pid> | SELF | ALL } ] [ -X { <pid> | SELF | ALL } ]
[ -o [ <filename> ] | -f [ <filename> ] ]
[ -s [ <hh:mm:ss> ] ] [ -e [ <hh:mm:ss> ] ]
比如要查看一个文件读写5次间隔2秒,cpu使用情况
sar -u -o filename 2 5
查看内存sar -r 2 5
查看网络 sar -n DEV 2 5
安装依赖包,yum install flex byacc libpcap ncurses ncurses-devel libpcap-devel
上传到linux安装包,可以使用crt中的put命令上传,解压可能需要用到unzip、tar命令,其中解压gz2参数是jxvf,gz的是zxvf
安装,先编译,在解压的目录下执行:./configure 然后make && make install
2、使用
其中iftop
iftop: display bandwidth usage on an interface by host
Synopsis: iftop -h | [-npbBP] [-i interface] [-f filter code] [-N net/mask]
-h display this message
-n don't do hostname lookups
-N don't convert port numbers to services
-p run in promiscuous mode (show traffic between other
hosts on the same network segment)
-b don't display a bar graph of traffic
-B Display bandwidth in bytes
-i interface listen on named interface
-f filter code use filter code to select packets to count
(default: none, but only IP packets are counted)
-F net/mask show traffic flows in/out of network
-P show ports as well as hosts
-m limit sets the upper limit for the bandwidth scale
-c config file specifies an alternative configuration file
sar的帮助
Usage: sar [ options... ] [ <interval> [ <count> ] ]
Options are:
[ -A ] [ -b ] [ -B ] [ -c ] [ -d ] [ -i <interval> ] [ -p ] [ -q ]
[ -r ] [ -R ] [ -t ] [ -u ] [ -v ] [ -V ] [ -w ] [ -W ] [ -y ]
[ -I { <irq> | SUM | ALL | XALL } ] [ -P { <cpu> | ALL } ]
[ -n { DEV | EDEV | NFS | NFSD | SOCK | ALL } ]
[ -x { <pid> | SELF | ALL } ] [ -X { <pid> | SELF | ALL } ]
[ -o [ <filename> ] | -f [ <filename> ] ]
[ -s [ <hh:mm:ss> ] ] [ -e [ <hh:mm:ss> ] ]
比如要查看一个文件读写5次间隔2秒,cpu使用情况
sar -u -o filename 2 5
查看内存sar -r 2 5
查看网络 sar -n DEV 2 5
相关文章推荐
- ios plist文件读写
- ios开发代码
- ios 的几种通知机制的比较
- iOS定位服务与地图开发(3)---地理信息编码查询
- 11 Insanely Great iOS Developers Sites
- 9 Time-Saving iOS 7 Libraries
- [系统安装] 各种电脑进入BIOS方式
- iOS定位服务与地图开发(2)---地理信息反编码
- iOS定位服务与地图开发(1)---获取经纬度
- iOS开发中手机号码和价格金额有效性判断及特殊字符的限制
- ios真机测试问题:Missing proxy for identifier Upstream Placeholder-cQP-XH-dSX
- IOS学习笔记(六)inputAccessoryView,inputView
- 基本输入输出系统BIOS---显示输出
- Xcode做ios开发编译成功之后模拟器黑屏
- nagios+ganglia分布式监控
- IOS初掌握
- iOS开发-植入广告(iAd, Admob实例)
- nios pio interrupt 的使能
- iOS申请发布证书-图文详解
- ios tableview 那些事(二十) ios7 分割线短 15 像素