Computer System/Storage

[스토리지] dstat - 리눅스 리소스 모니터링 툴 (CPU, 스토리지, 네트워크)

해리팍 2017. 10. 26. 09:25
반응형

안녕하세요.


리눅스의 리소스 모니터링 툴인 dstat을 소개합니다.


dstat은 리눅스 시스템의 CPU, 스토리지 (디스크), 네트워크 사용량을 실시간으로 보여줍니다.


(설치는 yum install dstat 으로 가능합니다. 기본적으로 깔려있는 툴 입니다.)



1. Usage


# 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

  -r, --io               enable io stats (I/O requests completed)

  -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


  --aio                  enable aio stats

  --fs, --filesystem     enable fs stats

  --ipc                  enable ipc stats

  --lock                 enable lock stats

  --raw                  enable raw stats

  --socket               enable socket stats

  --tcp                  enable tcp stats

  --udp                  enable udp stats

  --unix                 enable unix stats

  --vm                   enable vm stats


  --plugin-name          enable plugins by plugin name (see manual)

  --list                 list all available plugins


  -a, --all              equals -cdngy (default)

  -f, --full             automatically expand -C, -D, -I, -N and -S lists

  -v, --vmstat           equals -pmgdsc -D total


  --bw, --blackonwhite   change colors for white background terminal

  --float                force float values on screen

  --integer              force integer values on screen

  --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 (default: 1)

count is the number of updates to display before exiting (default: unlimited)

 



2. 사용법


기본적으로 'dstat'만 입력하셨을 경우 전체 CPU, 스토리지, 네트워크 사용량을 1초 간격으로 보여줍니다.



3. 주요 옵션


(1) CPU 관련


-c : 전체 CPU 상태를 보여줍니다.


-C 0, 1, 2, ... total : 각 CPU 코어의 상태를 보여줍니다.


(2) 스토리지 관련


-d : 전체 스토리지 상태를 보여줍니다.


-D sda, sdb, ... total : 각 스토리지의 상태를 보여줍니다.


(3) 네트워크 관련


-n : 전체 네트워크 상태를 보여줍니다.


-N eth0, eth1, ... total : 각 네트워크 인터페이스의 상태를 보여줍니다.


(4) 기타


-g : 페이징 입출력 상태


-m : 메모리 상태


-t : 타임 스템프


마지막에 숫자 : 인터벌

반응형