• 利用dstat来监控Linux系统资源使用情况——超级【赞】


      在Linuxtone论坛中,发现一个很好的性能监测工具dstat,很好用,可以完成vmstat,iostat,netstat等工具才能完成的任务,而且是着色显示、动态监控系统资源使用情况,还可以通过参数来指定监控那些内容,如CPU、内存等。

      在RedHat系统中安装它,本身没有安装本应用

    #yum install dstat* -y

    安装完成后,就可以直接使用"dstat"命令了!

      运行

    #dstat         ——>默认为dstat -cdngy 1或dstat -a 1

    常用的参数:

        1、统计CPU,IO ,network,system load

    #dstat -cndymlp -N total -D total 5 25

      

      2、统计网卡eth0/hda的信息

    #dstat -cdnsil -D hda -N eth0

      

      3、全屏显示出来

    #dstat -cdlmnpsy

      

      4、详细内容

    #dstat -lasmt

    附参数解释:

    Dstat options:
      -c, --cpu              显示CPU情况
         -C 0,3,total           include cpu0, cpu3 and total
      -d, --disk             显示磁盘情况
         -D total,hda           include hda and total
      -g, --page             enable page stats
      -i, --int              enable interrupt stats
         -I 5,eth2              include int5 and interrupt used by eth2
      -l, --load             enable load stats
      -m, --mem              显示内存情况
      -n, --net              显示网络情况
         -N eth1,total          可以指定网络接口
      -p, --proc             enable process stats
      -s, --swap             显示swap情况
         -S swap1,total         可以指定多个swap
      -t, --time             enable time counter
      -y, --sys              enable system stats
      --ipc                  报告IPC消息队列和信号量的使用情况 
      --lock                 enable lock stats
      --raw                  enable raw stats
      --tcp                  enable tcp stats
      --udp                  enable udp stats
      --unix                 enable unix stats
    
      -M stat1,stat2         enable external stats
         --mods stat1,stat2
    
      -a, --all              使用-cdngy 缺省的就是这样显示
      -f, --full             使用 -C, -D, -I, -N and -S 显示
      -v, --vmstat           使用-pmgdsc -D 显示
    
      --integer              show integer values
      --nocolor              disable colors (implies --noupdate)
      --noheaders            只显示一次表头以后就不显示了,使用重定向写入文件时很有用
      --noupdate             disable intermediate updates
      --output file          写入到CVS文件中

    文章参考:http://blog.chinaunix.net/u1/43917/showart_350956.html

  • 相关阅读:
    SuperSocket 1.4 stable正式发布
    用ILMerge合并Silverlight, WindowsPhone或Mono for Android的程序集
    给手势UITapGestureRecognizer添加"tag"标志
    ios 时间差计算 转
    webView基本用法
    iphone5页面适配修改
    net 面试题集锦
    绝笔绝路逢生
    请教:福州都有哪些健身俱乐部
    Fedora 17 安装 VMware Tools 的先决条件
  • 原文地址:https://www.cnblogs.com/sbaicl/p/2748539.html
Copyright © 2020-2023  润新知