Linux ETC

명령어 dstat 사용하기

2015.09.01 17:35

호스트웨이 조회 수:4370

dstat 란?

- 터미널 및 콘솔에서 해당 서버의 여러가지 정보를 실시간으로 모니터링 하는 명령어


1. 설치


#yum

[root@hostway ~]# yum install dstat 


#Source

2. 옵션

dstat [-afv] [options..] [delay [count]] 

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

3. 실행


[root@hostway ~]# dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
  0   1  99   0   0   0| 439k  121k|   0     0 |   0     0 | 145    88
  0   0 100   0   0   0|   0     0 | 186B  838B|   0     0 |  33    16
  0   0 100   0   0   0|   0     0 | 232B  358B|   0     0 |  47    27
  0   0 100   0   0   0|   0     0 | 232B  358B|   0     0 |  24     9


명령어 옵션에 따라 각기 다른 모니터링 결과를 얻을수 있습니다.
번호 제목 글쓴이 날짜 조회 수
106 rsync / 파티션 전체 동기화 방법 호스트웨이 2012.12.14 2428
105 특정 파일이 소속된 rpm 패키지 찾기 호스트웨이 2012.12.14 1780
104 df 와 du의 출력 크기가 다르게 보이는 이유 호스트웨이 2012.12.14 4427
103 nl명령어를 사용해 파일내용 출력시 행번호 붙이기 file 호스트웨이 2012.12.20 3595
102 df 쉽게 보기 호스트웨이 2012.12.20 2835
101 쉘 프롬프트에서 바로 이전 디렉토리로 이동하기 호스트웨이 2012.12.20 2751
100 free -m 에서 free (남는 메모리 양) 최소량 제한하기 호스트웨이 2012.12.21 2147
99 [ERROR] ftp error 500 OOPS: cannot change directory:/home/ 호스트웨이 2012.12.21 4285
98 리눅스 캐시 메모리 비우기 file 호스트웨이 2012.12.26 5269
97 리눅스 free 명령어 호스트웨이 2012.12.26 1817
96 ls -l 출력 시 날짜형태 변경 호스트웨이 2012.12.27 6139
95 리눅스 uniq 명령어 file 호스트웨이 2012.12.27 7877
94 sftp 서비스 막기 호스트웨이 2012.12.27 1319
93 오늘 생성한 파일만 조회하기 호스트웨이 2012.12.27 6239
92 partprobe - 리부팅 없이 사용 중인 파티션 재인식 호스트웨이 2012.12.28 8322
91 samba 설치 file 호스트웨이 2014.04.14 3364
90 리눅스 커널 업데이트 및 커널 변경 부팅 방법 file 호스트웨이 2014.10.30 23413
89 SVN(subversion) 설치 및 셋팅 file 호스트웨이 2014.12.02 6423
88 epel-release 설치하기 file 호스트웨이 2014.12.22 14291
87 ngrinder를 이용한 부하 테스트 - 1) Controller 설치 file 호스트웨이 2015.04.08 4285