于吉吉的技術(shù)博客

          建造高性能門(mén)戶(hù)網(wǎng)

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            65 隨筆 :: 6 文章 :: 149 評(píng)論 :: 0 Trackbacks
          在微博看到介紹的一款linux系統(tǒng)信息神器,dstat,收藏一下

          dstat可以直接可直接替換vmstat, iostat, netstat ,nfsstat, ifstat等系統(tǒng)工具,監(jiān)控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

          安裝很簡(jiǎn)單就完成,先看看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)

          當(dāng)執(zhí)行dstat命令時(shí),默認(rèn)它會(huì)收集cpu,disk,net,paging,system等數(shù)據(jù),并且每秒收集一次
          看一下我們常用的參數(shù)

          -c, --cpu              enable cpu stats 顯示cpu的情況
          -d, --disk             enable disk stats 顯示硬盤(pán)的情況
          -l, --load             enable load stats 顯示系統(tǒng)的負(fù)載情況
          -m, --mem              enable memory stats 顯示內(nèi)存的情況
          -n, --net              enable network stats 顯示網(wǎng)絡(luò)的情況
          -p, --proc             enable process stats 顯示進(jìn)程的情況
          -s, --swap             enable swap stats 顯示swap的情況
          -y, --sys              enable system stats 顯示系統(tǒng)的情況
          --output file          write CSV output to file 寫(xiě)到csv文件中

          默認(rèn)情況下dstat是每秒鐘就收集數(shù)據(jù)一次,可以修改一下讓它每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 陳于喆 閱讀(2268) 評(píng)論(3)  編輯  收藏

          評(píng)論

          # re: 安裝配置整理之 dstat[未登錄](méi) 2011-05-19 15:42 lee
          路過(guò)此處,,,lee  回復(fù)  更多評(píng)論
            

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

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


          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 武夷山市| 沙坪坝区| 湘乡市| 聂荣县| 重庆市| 柞水县| 疏附县| 炉霍县| 荃湾区| 施甸县| 桃源县| 灵丘县| 莎车县| 枝江市| 辽宁省| 巴青县| 嘉兴市| 宜兰县| 怀集县| 长治市| 扬州市| 炎陵县| 同德县| 沙河市| 汕尾市| 沾益县| 图木舒克市| 长垣县| 革吉县| 库车县| 北辰区| 双江| 岗巴县| 周至县| 美姑县| 浠水县| 安庆市| 新民市| 苗栗县| 浦北县| 馆陶县|