码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 性能工具 - sar学习

时间:2016-04-08 00:56:08      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:

简介

sar是一款在linux下的性能工具,可以观察到CPU,内存,IO,运行队列,每秒上下文切换等信息。

软件工具安装

#Ubuntu
sudo apt-get install sysstat
# CentOS
yum install sysstat
# CentOS
rpm -ivh sysstat-10.0.0-1.i586.rpm

源码安装

 1 #Download
 2 wget http://pagesperso-orange.fr/sebastien.godard/sysstat-10.0.0.tar.bz2
 3 # tar and cd
 4 tar -xvjf sysstat-10.0.0.tar.bz2
 5 cd sysstat-10.0.0/
 6 #configure ("--help"can help you understand the parameters)
 7 #--enable-install-cron auto startup when linux start
 8 ./configure --enable-install-cron
 9 #make
10 make
11 #make install, sar and  systat tools would be located in /usr/local/bin
12 sudo make install

测试版本

技术分享

统计信息

1)CPU统计信息

1 #sar 1 33 times with 1 second each time

技术分享

2)内存空闲与使用率

技术分享

3)已使用的Swap空间

技术分享

4)综合I/O活动数据

技术分享

5)独立块设备I/O活动数据

技术分享

6)同时显示实际设备名字

技术分享

7)展示每秒上下文切换

技术分享

8)运行队列与负载报告

技术分享

9)其他功能,请 man sar

 

Linux 性能工具 - sar学习

标签:

原文地址:http://www.cnblogs.com/loadofleaf/p/5366140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!