介紹
Linux下的IO統(tǒng)計(jì)工具如iostat, nmon等大多數(shù)是只能統(tǒng)計(jì)到per設(shè)備的讀寫情況, 如果你想知道每個(gè)進(jìn)程是如何使用IO的就比較麻煩.iotop 是一個(gè)用來監(jiān)視磁盤 I/O 使用狀況的 top 類工具。iotop 具有與 top 相似的 UI弄砍,其中包括 PID奇颠、用戶纠脾、I/O、進(jìn)程等相關(guān)信息喳魏。
用法:
Usage: /usr/bin/iotop [OPTIONS]
交互控制鍵:
左和右箭頭來改變排序的列,
r來排序順序,
o切換--only option,
p切換--processes option,
a切換累記選項(xiàng)芙贫,
q退出,
any other key to force a refresh.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o, --only only show processes or threads actually doing I/O #只顯示進(jìn)程或線程活動(dòng)的io
-b, --batch non-interactive mode
-n NUM, --iter=NUM number of iterations before ending [infinite] #在結(jié)束之前的迭代次數(shù)(無限)
-d SEC, --delay=SEC delay between iterations [1 second] #迭代之間的延遲(1秒)
-p PID, --pid=PID processes/threads to monitor [all] #進(jìn)程id
-u USER, --user=USER users to monitor [all]
-P, --processes only show processes, not all threads
-a, --accumulated show accumulated I/O instead of bandwidth #顯示累計(jì)I / O帶寬
-k, --kilobytes use kilobytes instead of a human friendly unit #使用千字節(jié)而不是人類的友好單位
-t, --time add a timestamp on each line (implies --batch) #在每一行添加一個(gè)時(shí)間戳
-q, --quiet suppress some lines of header (implies --batch)