Oli*_*Oli 8 server performance command-line io
因此,我有一台服务器在多次安装 Wordpress 的重压下苦苦挣扎。东西缓存得比较好(无论如何我打算改进一些东西),但我可以很快看到磁盘 IO 非常高。
我曾经iotop看到它主要是磁盘上的 PHP 鸣喇叭,但我真的很想知道哪些文件。我觉得如果我知道这一点,我可能会发现其他问题或找到可以扩大的瓶颈(将内容移到 ram-disk 等)。
所以我正在寻找一个命令,它会给我一个打开文件的列表,自命令开始以来,按它们的 IO 排序。或者在设定的时间段内工作的东西,比如 60 秒。
注意:我正在寻找更多lsof——我需要按总 IO 吞吐量排序的输出。
小智 9
尝试inotifywatch。
从手册页:
% inotifywatch -v -e access -e modify -t 60 -r ~/.beagle
Establishing watches...
Setting up watch(es) on /home/rohan/.beagle
OK, /home/rohan/.beagle is now being watched.
Total of 302 watches.
Finished establishing watches, now collecting statistics.
Will listen for events for 60 seconds.
total access modify filename
1436 1074 362 /home/rohan/.beagle/Indexes/FileSystemIndex/PrimaryIndex/
1323 1053 270 /home/rohan/.beagle/Indexes/FileSystemIndex/SecondaryIndex/
303 116 187 /home/rohan/.beagle/Indexes/KMailIndex/PrimaryIndex/
261 74 187 /home/rohan/.beagle/TextCache/
206 0 206 /home/rohan/.beagle/Log/
42 0 42 /home/rohan/.beagle/Indexes/FileSystemIndex/Locks/
18 6 12 /home/rohan/.beagle/Indexes/FileSystemIndex/
12 0 12 /home/rohan/.beagle/Indexes/KMailIndex/Locks/
3 0 3 /home/rohan/.beagle/TextCache/54/
3 0 3 /home/rohan/.beagle/TextCache/bc/
3 0 3 /home/rohan/.beagle/TextCache/20/
3 0 3 /home/rohan/.beagle/TextCache/62/
2 2 0 /home/rohan/.beagle/Indexes/KMailIndex/SecondaryIndex/
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2668 次 |
| 最近记录: |