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

  • 相关阅读:
    5.8
    python运维自动化
    javascript学习(一)
    python学习-1
    A-GPS学习笔记(二) 之SUPL
    A-GPS学习笔记(一)
    CF756D Bacterial Melee
    LG P2495 [SDOI2011]消耗战
    LG P7325 [WC2021] 斐波那契
    LG P7324 [WC2021] 表达式求值
  • 原文地址:https://www.cnblogs.com/loadofleaf/p/5366140.html
Copyright © 2011-2022 走看看