在 linux 中显示磁盘活动的类似 htop 的工具
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/469159/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
an htop-like tool to display disk activity in linux
提问by user54579
I am looking for a Linux command-line tool that would report the disk IO activity. Something similar to htop
would be really cool. Has someone heard of something like that?
我正在寻找一个可以报告磁盘 IO 活动的 Linux 命令行工具。类似的东西htop
会很酷。有人听说过这样的事情吗?
采纳答案by Egil
回答by jpalecek
It is not htop-like, but you could use atop. However, to display disk activity per process, it needs a kernel patch (available from the site).These kernel patches are now obsoleted, only to show per-process network activity an optional module is provided.
它不像 htop,但你可以使用atop。但是,要显示每个进程的磁盘活动,它需要一个内核补丁(可从站点获得)。这些内核补丁现已过时,仅提供了一个可选模块来显示每个进程的网络活动。
回答by Egil
Use collectl
which has extensive process I/O monitoring including monitoring threads.
使用collectl
具有广泛的进程 I/O 监控,包括监控线程。
Be warned that there are I/O counters for I/O being written to cache and I/O going to disk. collectl
reports them separately. If you're not careful you can misinterpret the data. See http://collectl.sourceforge.net/Process.html
请注意,有 I/O 计数器用于将 I/O 写入缓存和将 I/O 写入磁盘。 collectl
分别报告。如果您不小心,您可能会误解数据。见http://collectl.sourceforge.net/Process.html
Of course, it shows a lot more than just process stats because you'd want one tool to provide everything rather than a bunch of different one that displays everything in different formats, right?
当然,它显示的不仅仅是流程统计数据,因为您希望一个工具提供所有内容,而不是一堆以不同格式显示所有内容的不同工具,对吗?
回答by Egil
nmonshows a nice display of disk activity per device. It is available for linux.
nmon很好地显示了每个设备的磁盘活动。它可用于 linux。
? Disk I/O ?????(/proc/diskstats)????????all data is Kbytes per second??????????????????????????????????????????????????????????????? ?DiskName Busy Read WriteKB|0 |25 |50 |75 100| ? ?sda 0% 0.0 127.9|> | ? ?sda1 1% 0.0 127.9|> | ? ?sda2 0% 0.0 0.0|> | ? ?sda5 0% 0.0 0.0|> | ? ?sdb 61% 385.6 9708.7|WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWR> | ? ?sdb1 61% 385.6 9708.7|WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWR> | ? ?sdc 52% 353.6 9686.7|WWWWWWWWWWWWWWWWWWWWWWWWWWR > | ? ?sdc1 53% 353.6 9686.7|WWWWWWWWWWWWWWWWWWWWWWWWWWR > | ? ?sdd 56% 359.6 9800.6|WWWWWWWWWWWWWWWWWWWWWWWWWWWW> | ? ?sdd1 56% 359.6 9800.6|WWWWWWWWWWWWWWWWWWWWWWWWWWWW> | ? ?sde 57% 371.6 9574.9|WWWWWWWWWWWWWWWWWWWWWWWWWWWWR> | ? ?sde1 57% 371.6 9574.9|WWWWWWWWWWWWWWWWWWWWWWWWWWWWR> | ? ?sdf 53% 371.6 9740.7|WWWWWWWWWWWWWWWWWWWWWWWWWWR > | ? ?sdf1 53% 371.6 9740.7|WWWWWWWWWWWWWWWWWWWWWWWWWWR > | ? ?md0 0% 1726.0 2093.6|>disk busy not available | ? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????