따라쟁이

Qnap에서 디스크(I/O) 사용이 많은 프로세스 찾기 본문

NAS

Qnap에서 디스크(I/O) 사용이 많은 프로세스 찾기

따라쟁이1 2017. 3. 30. 18:11

얼마전 펌업을 하고 부터 안그래도 하드가 쉴세 없이 돌아서 불만였는데 정말 쉬지 않고


매일같이 드륵댄다. 어떤 프로세스가 범인인지 알고 싶어 이곳저곳을 기웃거려봤다.


처음에

dstat를 사용해봤지만 모든 옵션플래그가 


http://dag.wiee.rs/home-made/dstat/

여기에 나온만큼 지원이 안된느지 버전이 다른지 동작하지 않는다.


[~] # dstat -c --top-cpu -d --top-bio --top-latency

dstat: option --top-cpu not recognized, try dstat -h for a list of all the options

[~] #

 

이렇게 뜬다 할까?


결국

아래글을 참조하다보니

Using dstat to check I/O and swap

http://articles.slicehost.com/2010/11/12/using-dstat-to-check-i-o-and-swap


이글의 아래쪽에 iotop이 있다는 소리를 듣고





Similar commands

Another program that can be used to check I/O is iotop. It has a better presentation than dstat if you're just looking for swap and I/O activity, but it requires a newer version of python (2.5). It's also not as versatile in terms of what it can report.

The "sysstat" package includes several commands useful for gathering system usage statistics, and newer versions of the package include a program named "pidstat". When run with the "-d" option pidstat will display disk I/O information on a per-process basis.



설치를 했다.



[/] # opkg install iotop

Installing iotop (0.6-1) to root...

Downloading http://pkg.entware.net/binaries/x86-64/iotop_0.6-1_x86-64.ipk

Configuring iotop.

[/] # 


결국 아래와 같은 화면을 얻었지.


Total DISK READ :       0.00 B/s | Total DISK WRITE :     378.23 K/s

Actual DISK READ:       9.30 K/s | Actual DISK WRITE:     454.96 K/s

  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND

16194 be/4 admin       0.00 B/s  186.02 K/s  0.00 % 15.95 % qLogEngined: Write log is enabled...

  382 be/4 admin       0.00 B/s    0.00 B/s  0.00 % 15.80 % [kjournald]

 8030 be/5 admin       0.00 B/s  136.41 K/s  0.00 % 10.10 % versiond

 7131 be/5 admin       0.00 B/s    3.10 K/s  0.00 %  3.22 % mysqld --defaults-file=/etc/qbox~tmp/mysql_qbox.sock --port=23310

 9576 be/4 admin       0.00 B/s    3.10 K/s  0.00 %  0.00 % mockingbird

27217 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % qboxd -n 0 -b -d0

    1 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % init

    2 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]

    3 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/0]

    5 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/0:0H]

    7 rt/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/0]

    8 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [rcu_bh]

    9 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [rcu_sched]

   10 rt/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/1]

   11 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/1]

   13 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/1:0H]

   14 rt/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/2]

   15 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/2]

   17 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/2:0H]

   18 rt/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/3]

   19 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/3]

   21 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/3:0H]

   22 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [khelper]

   23 be/4 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kdevtmpfs]

   24 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [netns]

   25 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [writeback]

   26 be/0 admin       0.00 B/s    0.00 B/s  0.00 %  0.00 % [kintegrityd]