内容简介:IOTop 命令是专门显示硬盘 IO 的命令, 界面风格类似 top 命令IPtraf 是一个运行在 Linux 下的简单的网络状况分析工具
linux 工具
查看进程占用带宽状况 nethogs
[root@localhost~]# yum -y install libpcap-devel ncurses-devel [root@localhost~]# tar zxvf nethogs-0.8.0.tar.gz [root@localhost~]# cd nethogs [root@localhost nethogs]# make &&make install [root@localhost nethogs]# nethogs eth0
磁盘读取性能测试 iozone
http://www.iozone.org/src/current/
- -a使用全自动模式
- -n 为自动模式设置最小文件大小 (Kbytes)
- -g 设置自动模式可使用的最大文件大小 Kbytes
- -i 用来指定运行哪个测试
- -f 指定测试文件的名字完成后自动删除
- -R 产生 Excel 到标准输出
- -b 指定输出到指定文件上
[root@localhost current]#tar xvf iozone3_420.tar [root@localhost~]#cd iozone3_420/src/current/ [root@localhost current]#make linux [root@localhost current]#./iozone -a -n 512m-g 16g-i 0-i 1-i 5-f /mnt/iozone -Rb./iozone.xls
实时监控磁盘 IO-IOTop
IOTop 命令是专门显示硬盘 IO 的命令, 界面风格类似 top 命令
[root@localhost ~]#yum -y install iotop
网络流量监控 - IPtraf
IPtraf 是一个运行在 Linux 下的简单的网络状况分析工具
[root@localhost ~]#yum -y install iptraf
网络流量监控 - IFTop
http://www.ex-parrot.com/~pdw/iftop/
[root@localhost ~]#tar zxvf iftop-0.17.tar.gz [root@localhost ~]#cd iftop-0.17 [root@localhost iftop-0.17]#./configure [root@localhost iftop-0.17]#make &&make install [root@localhost iftop-0.17]#iftop [root@localhost iftop-0.17]#iftop -i eth0 # 指定监控网卡接口
- TX:发送流量
- RX:接收流量
- TOTAL:总流量
- Cumm:运行 iftop 到目前时间的总流量
- peak:流量峰值
- rates:分别表示过去 2s 10s 40s 的平均流量
系统资源监控 - NMON
http://sourceforge.jp/projects/sfnet_nmon/releases/
[root@localhost~]#chmod +x nmon_x86_64_rhel6 [root@localhost~]#mv nmon_x86_64_rhel6 /usr/sbin/nmon [root@localhost~]#nmon
监控多个日志 - MultiTail
MultiTail 是在控制台打开多个窗口用来实现同时监控多个日志文档、类似 tail 命令的功能的软件
[root@localhost ~]# yum -y install multitail [root@localhost ~]# multitail -e "fail"/var/log/secure #筛选关键字进行监控 [root@localhost ~]# multitail -l "ping baidu.com"#监控后面的命令 - l 将要执行的命令 [root@localhost ~]# multitail -i /var/log/messages -i /var/log/secure #-i 指定一个文件名
页面显示磁盘空间使用情况 - Agedu
http://www.chiark.greenend.org.uk/~sgtatham/agedu/
[root@localhost ~]#tar zxvf agedu-r9723.tar.gz [root@localhost ~]#cd agedu-r9723 [root@localhost ~]#./configure [root@localhost ~]#make &&make install [root@localhost ~]#agedu -s /#-s 扫描 [root@localhost ~]#agedu -w --address 192.168.0.10:80#-w 输入一个网页链接 [root@localhost ~]#agedu -w --address 192.168.0.108080--auth none #--auth 关闭认证如果不加端口号会生成一个随机的用浏览器访问
Web 压力测试 - Httperf
Httperf 比 ab 更强大,能测试出 web 服务能承载的最大服务量及发现潜在问题;比如:内存使用、稳定性。最大优势:可以指定规律进行压力测试,模拟真实环境
[root@localhost ~]#tar zxvf httperf-0.9.0.tar.gz [root@localhost ~]#cd httperf-0.9.0 [root@localhost httperf-0.9.0]#./configure [root@localhost httperf-0.9.0]#make &&make install [root@localhost ~]#httperf --hog --server=192.168.0.202--uri=/index.html --num-conns=10000--wsess=10,10,0.1
- --hog:让 httperf 尽可能多产生连接,httperf 会根据硬件配置,有规律的产生访问连接
- --num-conns:连接数量,总发起 10000 请求
- --wsess: 用户打开网页时间规律模拟,第一个 10 表示产生 10 个会话连接,第二个 10 表示每个会话连接进行 10 次请求,0.1 表示每个会话连接请求之间的间隔时间 / s
以上所述就是小编给大家介绍的《linux 运维工具》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- ENVI扩展工具:RandomForest分类工具
- 15大安全工具和下载黑客工具
- 版本管理工具及 Ruby 工具链环境
- [译]Go性能分析工具工具和手段
- 工具 | 一个在线生成 nginx 配置文件的开源工具
- 【工具分享】PxCook像素大厨——很好用的标记工具
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。