于吉吉的技術博客

          建造高性能門戶網

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            65 隨筆 :: 6 文章 :: 149 評論 :: 0 Trackbacks
          在微博看到介紹的一款linux系統信息神器,dstat,收藏一下

          dstat可以直接可直接替換vmstat, iostat, netstat ,nfsstat, ifstat等系統工具,監控cpu、disk 、mem、load、interrupt、net、proc、CS....

          安裝
          wget http://rpmforge.sw.be/redhat/7.3/en/i386/rpmforge/RPMS/dstat-0.6.9-1.rh7.rf.noarch.rpm
          rpm -ivh dstat-0.6.9-1.rh7.rf.noarch.rpm
          or
          apt-get install dstat
          yum install dstat

          安裝很簡單就完成,先看看help

          tech163:/usr/local/download# dstat --help
          Usage: dstat 
          [-afv] [options..] [delay [count]]
          Versatile tool for generating system resource statistics

          Dstat options:
            -c
          , --cpu              enable cpu stats
               -C 
          0,3,total           include cpu0, cpu3 and total
            -d
          , --disk             enable disk stats
               -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              enable memory stats
            -n
          , --net              enable network stats
               -N eth1
          ,total          include eth1 and total
            -p
          , --proc             enable process stats
            -s
          , --swap             enable swap stats
               -S swap1
          ,total         include swap1 and total
            -t
          , --time             enable time/date output
            -T
          , --epoch            enable time counter (seconds since epoch)
            -y
          , --sys              enable system stats
            --ipc                  enable ipc stats
            --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              equals -cdngy (default)
            -f
          , --full             expand -C, -D, -I, -N and -S discovery lists
            -v
          , --vmstat           equals -pmgdsc -D total

            --integer              show integer values
            --nocolor              disable colors (implies --noupdate)
            --noheaders            disable repetitive headers
            --noupdate             disable intermediate updates
            --output file          write CSV output to file

            delay is the delay in seconds between each update
            count is the number of updates to display before exiting
            The default delay is 
          1 and count is unspecified (unlimited)

          當執行dstat命令時,默認它會收集cpu,disk,net,paging,system等數據,并且每秒收集一次
          看一下我們常用的參數

          -c, --cpu              enable cpu stats 顯示cpu的情況
          -d, --disk             enable disk stats 顯示硬盤的情況
          -l, --load             enable load stats 顯示系統的負載情況
          -m, --mem              enable memory stats 顯示內存的情況
          -n, --net              enable network stats 顯示網絡的情況
          -p, --proc             enable process stats 顯示進程的情況
          -s, --swap             enable swap stats 顯示swap的情況
          -y, --sys              enable system stats 顯示系統的情況
          --output file          write CSV output to file 寫到csv文件中

          默認情況下dstat是每秒鐘就收集數據一次,可以修改一下讓它每30秒收集一次

          dstat -cdlmnpsy 30

          ----total-cpu-usage---- -dsk/total- ---load-avg--- ------memory-usage----- -net/total- ---procs--- -swp/total- ---system--
          usr sys idl wai hiq siq| read  writ| 1m   5m  15m | used  buff  cach  free| recv  send|run blk new| used  free| int   csw 
            
          0   0 100   0   0   0| 121B 4116B|   0    0    0|  79M  156M  176M  101M|   0     0 |  0   0   0| 504k 1024M|  20    19 
            
          0   0 100   0   0   0|   0  8875B|   0    0    0|  79M  156M  176M  101M|1256B 1140B|  0   0   0| 504k 1024M|  31    31


          posted on 2011-03-24 17:15 陳于喆 閱讀(2267) 評論(3)  編輯  收藏

          評論

          # re: 安裝配置整理之 dstat[未登錄] 2011-05-19 15:42 lee
          路過此處,,,lee  回復  更多評論
            

          # re: 安裝配置整理之 dstat[未登錄] 2011-06-14 09:34 deng
          不錯呀,最近也在研究這方面的東東,剛好看到,不錯  回復  更多評論
            

          # re: 安裝配置整理之 dstat 2014-06-06 15:52 lv
          不使用yum該怎么安裝,已經下載了dstat的rpm包
          是直接使用rpm -ivh dstat-*.rpm進行安裝么?
          直接這樣安裝好像不行的樣  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 雷波县| 边坝县| 郎溪县| 潮安县| 宜丰县| 酉阳| 新余市| 韶关市| 萍乡市| 霞浦县| 普兰店市| 永新县| 巴林左旗| 东城区| 荥经县| 齐河县| 丁青县| 宁德市| 涞源县| 平度市| 山丹县| 奉新县| 华池县| 望江县| 新田县| 高碑店市| 洪湖市| 油尖旺区| 湘乡市| 彩票| 左云县| 漯河市| 阳西县| 长沙县| 苍溪县| 夹江县| 肇庆市| 利辛县| 辽阳县| 北辰区| 岑溪市|