zoukankan      html  css  js  c++  java
  • Linux 性能工具

    简介

    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

  • 相关阅读:
    MySQL my.cnf详解
    函数:sleep-exit-wait
    fork-小实验
    OS-进程调度
    CET-4流程
    SDK和API的区别
    生活-金钱管理-不是理财
    算法设计与分析:Strassen矩阵乘法
    力扣:二进制加法求和
    算法设计与分析:大整数乘法
  • 原文地址:https://www.cnblogs.com/loadofleaf/p/5366140.html
Copyright © 2011-2022 走看看