我有一个本地文件系统,用nfs(非常大的xfs分区)导出rw.
某处(我无法确定谁或什么是远程进程)正在编写文件,创建新文件或更新文件附加更多数据;并且可用磁盘空间正在快速运行.
为了确定哪些文件我可以安全地移动到其他地方,我的命令如下:
find . -type f -mtime +15 -size +100M
find . -type f -mmin -2
但有没有一种通用方法来调用查找或任何其他系统实用程序来跟踪当前正在增长/正在编写的文件(远程)?
解决方法:
最简单的方法可能是使用iotop它就像顶部但列出了I / O操作.这应该显示哪些进程/文件正在写入最多的数据.
NAME
iotop - simple top-like I/O monitor
DESCRIPTION
iotop watches I/O usage information output by the
Linux kernel (requires 2.6.20 or later) and displays
a table of current I/O usage by processes or threads
on the system. At least the CONFIG_TASK_DELAY_ACCT,
CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CON‐
FIG_VM_EVENT_COUNTERS options need to be enabled in
your Linux kernel build configuration.
标签:linux,find,filesystems,nfs
来源: https://codeday.me/bug/20190816/1670207.html